Form is blank if query returns no records

BMag

MagMan
Local time
Yesterday, 19:31
Joined
Sep 24, 2004
Messages
9
If I open a form based on a query that returns no records, the form is completely blank. No controls, nothing.
Is there any way to capture if the query is empty? I was thinking I could check in the form's OnOpen or OnLoad event. I just have no idea what property to check for.
Thanks for any help.
Brent
 
Form

See if this helps:
Put this code in the On Load event:

DoCmd.GoToRecord , , acNewRec
 
Private Sub Form_Open(Cancel As Integer)
If (RecordsetClone.RecordCount) = 0 Then
Me.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
TrDate.SetFocus
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom