Teedee Access VBA Teedee 2010
Show/Hide Form
Home Tutorial Code Snippets

Show/Hide a Form

Checks whether the named form is open; if open the form is closed, otherwise the form is opened.

Requirements

None

Code Snippet

Public Function ToggleForm (Formname as String) As Boolean     Dim f As Form     For Each f In Forms         If f.Name = Formname Then             DoCmd.Close acForm, f.Name             Exit Function         End If     Next     DoCmd.OpenForm Formname End Function