I have modified the following code in the Switchboard form created by the Switchboard Manager add-in that comes with Access 97 to hide the switchboard form when other forms are opened:
Select Case rst![Command]
' Open a form in Add mode.
Case conCmdOpenFormAdd
Me.Visible = False
DoCmd.OpenForm rst![Argument], , , , acAdd, , Me.Name
...
End Select
and then added the following code to each form that is opened:
Private Sub Form_Unload(Cancel As Integer)
Forms(Me.OpenArgs).Visible = True
End Sub
and everything works just fine... except for one single form. I've looked it over in great detail and cannot find anything different about this one form that would prevent this code from working.
In debug mode I have confirmed that the OpenArgs value in this one form is NULL!?! This form (or any other for that matter) does not set, reset or even use the OpenArgs property in any way (other than as noted above).
What could possibly be causing this one form's OpenArgs property to be null????
Select Case rst![Command]
' Open a form in Add mode.
Case conCmdOpenFormAdd
Me.Visible = False
DoCmd.OpenForm rst![Argument], , , , acAdd, , Me.Name
...
End Select
and then added the following code to each form that is opened:
Private Sub Form_Unload(Cancel As Integer)
Forms(Me.OpenArgs).Visible = True
End Sub
and everything works just fine... except for one single form. I've looked it over in great detail and cannot find anything different about this one form that would prevent this code from working.
In debug mode I have confirmed that the OpenArgs value in this one form is NULL!?! This form (or any other for that matter) does not set, reset or even use the OpenArgs property in any way (other than as noted above).
What could possibly be causing this one form's OpenArgs property to be null????