K
Katie
I have the following code attached to a form button and
get run-time error Object Required. What is the problem?
Is the record I get in executing the query not available
in this macro? How do I get around this? Thanks.
Private Sub Command14_Click()
DoCmd.OpenQuery "QueryAv"
If AVAILABILITY.[Booking ID] = 1 Then
'Hide availability form
Forms![SINGLE BOOKING AVAILABILITY].Visible = False
'Open the detail form
DoCmd.OpenForm "SINGLE BOOKING DETAIL"
End If
Exit_Command14_Click:
Exit Sub
End Sub
get run-time error Object Required. What is the problem?
Is the record I get in executing the query not available
in this macro? How do I get around this? Thanks.
Private Sub Command14_Click()
DoCmd.OpenQuery "QueryAv"
If AVAILABILITY.[Booking ID] = 1 Then
'Hide availability form
Forms![SINGLE BOOKING AVAILABILITY].Visible = False
'Open the detail form
DoCmd.OpenForm "SINGLE BOOKING DETAIL"
End If
Exit_Command14_Click:
Exit Sub
End Sub