How to show a message box if a query contains records

Juddy

Registered User.
Local time
Today, 09:33
Joined
Jul 31, 2014
Messages
14
Hi,

When a button is pressed on a form several different csv files are loaded into tables on my database. I have then got a query which displays any error records [Upload Errors].

What I want to do is display a message box if the Upload Errors query has any records in it.

Is this possible?

I am a newbie so not sure what I'm doing but attempted the following after an If macro: (DCount("Stock No",[Upload Errors]))>0 but this didn't work.

Thanks in advance for any help :)

Kim
 
you are porbably missing the [] around your stock no
 
Hi,

I've tried that but get the following error:
'The object doesn't contain the Automation object 'Stock No'

Any idea? :)

Thanks
Kim
 
what are the columns of your import error table?

Have you tried using "*" instead of stockno?

Friendly advice, avoid using spaces in column names
 
Hi,

Thanks for your help. :)

It now works after adding the "*" and it also seemed to need "" around the query name.

Thanks again!
Kim
 
Obviously needs the "" around the query name, each is a string input into the dcount
 

Users who are viewing this thread

Back
Top Bottom