Open Form if Has Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to figure out how to open a form ONLY if it has data. I am using
a macro to open the form. I've tried using a condition, but it won't
recognize the condition. It says the field doesn't exist. (Probably because
there is no data!)

Please help!

Thank you.
 
On the form load event you can write the code, to check if the form has any
records, if not the form will be closed

If Me.RecordsetClone.RecordCount = 0 Then
DoCmd.Close acForm, "FormName"
End If
 
Back
Top