Dorian, thanks for the reply but I don't understand your message. Can you
explain further. If the query produces no records, I want a message displayed
- not a blank record. Thanks! Jani
Not if you are opening the query itself directly from the main
database folder.
However, if you create a form, using the query as it's record source,
you can code the Form's Open event:
If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "No records"
Cancel = True ' Optional
End If
Open the Form.
The form will display your message and not open if there are no
records.
Set the Form's DefaultView property to Datasheet.
It will look just like the query datasheet.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.