no data results in blank screen need macro to display message

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

Guest

I have a form that displays blank if the criteria searched for is not there.
I would like to display a message that says no records found. I saw the post
on how to do it in code, however I do not know how to do code. Is there a
macro I can create for this?
 
weaver1 said:
I have a form that displays blank if the criteria searched for is not
there. I would like to display a message that says no records found.
I saw the post on how to do it in code, however I do not know how to
do code. Is there a macro I can create for this?

Code would be much easier and more flexible. I'm not much good at
macros, since I seldom use them, but you could try a macro like this:

Condition Action
---------------------------------- ------------------------------
------
[Recordset].[RecordCount]<>0 StopMacro

MsgBox
Message:
There are no records to display
Beep:
Yes
Type:
None
Title:
No Data

Close
Object
type: (blank)
Object
name: (blank)
Save:
No

Then you'd invoke the macro from the form's OnLoad event property.
 
Back
Top