No Records

Webmaster@worksnotfun.com

Registered User.
Local time
Today, 14:21
Joined
Jan 28, 2002
Messages
15
I have a form, that control source is a parameter query. The query asks for a report no. So if the user, hits return, or ok, the form opens to a blank record. How would I change this to say "No records found, please reenter the number". I've played with the OnError event, and the user can still select OK, and it opens to a blank record.
 
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Macro11_Err
If (RecordsetClone.RecordCount = 0) Then
DoCmd.Close
Beep
MsgBox "There are no invoices recorded for that period.", vbInformation, "No Invoices Recorded"
End If



Macro11_Exit:
Exit Sub

Macro11_Err:
MsgBox Error$
Resume Macro11_Exit
End Sub
 

Users who are viewing this thread

Back
Top Bottom