MsgBox in Update Queries

B

bigscousebear

I'm not very skilled at using VBA. I have created an update query that
reduces a number by 1. This is the criteria:

IIf([Maximum number of vouchers to be issued per day]<=0,"You cannot claim
this gift",[Maximum number of vouchers to be issued per day]-1)

The only problem is the "You cannot claim gift" part does not appear when
the field reaches 0. Ideally, I would like a proper message to appear. The
thing that does appear is a Microsoft that says in a roundabout way that the
query cannot be run.

Can anyone help, please?
 
A

Allen Browne

Queries are not powerful enough to do this.
You need to use a macro or VBA code.
 

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