How to avoid Blank Form

Ramu

Registered User.
Local time
Today, 04:42
Joined
Jun 21, 2003
Messages
23
Hi

I am facing always with this problem:

If my query 'parameter' or some query, if the input data is not matching with the available data - It shows as blank, how to avoid this? - Mostly I am trying to open a form (if the null value the access get hangs and the blank form appears)

Pls help

Regards
Ramu
 
If your query's result is no records, why would you expect a form not to be blank?

It's doing what it's supposed to.
 
Private Sub Form_Open(Cancel As Integer)


With CodeContextObject
If (.RecordsetClone.RecordCount = 0) Then
DoCmd.Close
Beep
MsgBox "There are no invoices recorded for this period.Please check the dates you have entered.", vbOKOnly, "No Records"

End If
End With
End Sub
 

Users who are viewing this thread

Back
Top Bottom