Help! How do i Verify that my query is generating results?

B

benjamin

Hi! Sorry for that uninformative title.

Basically i am creating a form with a subform which will query for customer
data based on 2 address lines. It works fine but only for existing
customers. I tried writing some codes to check if the customer existed using
VBA but it doesn't seem to work.

1) Created an event procedure to call up code for querying the subform.
2) need the codes for checking if the query is generating results.
3) if yes proceed as normal
4) if no, prompt for user action, new custome a/c creation etc...

Thank you
 
S

Stewart Tanner

Benjamin,
something like this could do it

if subform.recordsetclone.recordcount >0 then
'customers exist

else
' no customers

end if
 
B

benjamin

Thanks it works.
You are a life saver!!!


Stewart Tanner said:
Benjamin,
something like this could do it

if subform.recordsetclone.recordcount >0 then
'customers exist

else
' no customers

end if
 

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