Open Form if Has Data

C

Cathy

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.
 
O

Ofer Cohen

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
 
Top