How can I stop a POP up Forms if it doesn;t contain any records

G

Guest

Hi There, please forgive me if I am not using the proper terms. I have read
most of the cases in this forum and have not been able to find an answer to
my dilema.
I have a pop up form which retrieve records from a query, this popup form
opens every time when my main form opens, sometime this popup form doesn't
contain any records because they don't meet the criteria I setup in the
query.
Is there any way to make a little program or function to make the pop up
form not to pop if query is empty?

Thank you for any suggestions.
 
A

Al Camp

Julio,
Do a DCount against the table the PopUp usues, according to your PopUp criteria.
If it returns Null, don't open the form (exit the sub). If > 0 then open it.
 
G

Guest

Al, it has been a challenge so far specially since I don't know how to
program but I'll get it. I noticed something which I don't know if it will
make a difference, but you mention "Dcount it against you Table", the popup
form is from a query not a table. Does that makes a diference ?

Thanks.
 
A

Al Camp

Julio,
Whatever your criteria is for opening the PopUp, it can be run against the actual table
that feeds your form query,... OR the query itself (if it's a saved query)
If no records in the table meet your criteria, then neither will the query behind the
form.
 
G

Guest

Once again Al Thank you very much Al

Al Camp said:
Julio,
Whatever your criteria is for opening the PopUp, it can be run against the actual table
that feeds your form query,... OR the query itself (if it's a saved query)
If no records in the table meet your criteria, then neither will the query behind the
form.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 

Ask a Question

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.

Ask a Question

Top