I have the following Event Procedure in the On Open Property of a form
Private Sub Form_Open(Cancel As Integer)
Select Case Forms!FEditHud!cdmarker
Case "cd"
Me.Command1840.Visible = True
Me.Label1850.Visible = True
Me.Command1842.Visible = True
Me.Command1852.Visible = True
Me.GotoPage2.Visible = False
Me.Command1839.Visible = True
Me.Command1841.Visible = True
Me.Command21.Visible = False
Me.Command1507.Visible = False
Me.Command1853.Visible = True
Me.Command1857.Visible = True
Me.Command1858.Visible = True
Me.L701c.SetFocus
Me.L702c.SetFocus
Case "ss"
Case Else
MsgBox "check that cdmarker field has cd or ss"
End Select
End Sub
and occasionally, see this message when I open the form
"This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event.
For example, If the OnOpen Property of a form is set to =[field], the error occurs because Access expects a macro or event name to run when the event is fired.