Form Based off Query Question

  • Thread starter Thread starter scott04
  • Start date Start date
S

scott04

Hi everyone,
I have a form that's data source is based off a query. My question deal
with when the agent clears out their que and clicks on the form when zero
records are present. When this happens only the form header loads since
there are not any records left. Is there a way i can have a message popup on
the form load advising them that there are zero records needed to view??? I
know that it means zero records but i do not want to have to train them if a
message box can do the trick. Any suggestions? Thanks
 
Figured it out:
Private Sub Form_Load()
If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "There are currently no records to view.", vbInformation, "No
Records"
DoCmd.Close acForm, Me.Name, acSaveNo
End If
 
Back
Top