Display message when no data is found

RDSJMS

Registered User.
Local time
Today, 17:26
Joined
Jan 25, 2006
Messages
30
I have a macro in the On No Data event of a report that displays a message when the item number a user requests does not exist in the table being queried.

Now I need to get the same functionality in a form. The form is based on a parameter query with only one criteria [Please enter item number]. The form opens in Edit mode when a valid item number is entered.

I see that there is no On No Data event for either forms or queries, so I'm stumped on how to proceed.

Any and all assistance is appreciated.
 
Im a real novice at Access, so i do not know if this is the standard or most easiest way to do it, but i usually put:

If DCount("*", "Query name") = 0 Then
MsgBox "No Records Found", vbInformation
End If

HTH
 
oops guess i was wrong, suppose thats why im only a novice :)
 
Lyndseyd said:
oops guess i was wrong, suppose thats why im only a novice :)
We all start somewhere [at the beginning].
 
GHudson,

Once again, a BIG Thank You.

Like Lyndseyd, I'm also starting at the beginning with a fairly comprehensive project for my company. Sometimes it seems like I can get the hard stuff working, but miss the boat on the simple stuff.

Randy
 

Users who are viewing this thread

Back
Top Bottom