Message box for no data

Ripley

Registered User.
Local time
Today, 19:40
Joined
Aug 4, 2006
Messages
148
I've searched the forum, and i cant find a thread that helps me on this particular problem.

I am using access 2000. I have set up a query that filters dates from the current system date.

I want to say something like:

Code:
If my query has no records in it, then me.form.recordsource = "Table1"
If my query has records in it (Else) then me.form.recordsource = "Table1 Query"

How would i go about it? Thanks for your time.
 
no "Table1 Query" is the name of the query i want to display is there are records in the query
 
Use DCount() in the OnLoad event of your form and then code similar to what you have. Post back if you need something more specific.
 
yeah it wold be helpful if you could specify in more detail, thanks!
 
The use of the DCount function has been described in the forum quite often.
So I suggest to do a bit of research yourself by using the serach facility.

It's also clearly described in Access Help.

RV
 

Users who are viewing this thread

Back
Top Bottom