Macro conditions stop macro

G

Guest

I am trying to prevent my append query from executing if the number of
records returned by a query (which is the first macro step) returns more than
one record.
DCount("[Tno]","TrucknoQuery")>1
This works if the criteria for the TrucknoQuery is typed in the query
design. If I promt the user to enter criteria when the query runs, the macro
just stops regardless if the condition is true or false.
Is there some way to do this?
 
S

Steve Schapel

Tom,

Could you put an unbound textbox on a form which is open at the time
that the macro is run? Then you can get the user to enter the query
criteria in there, and in the design of the query, in the place of the
paramater prompt, you refer to the textbox using syntax such as...
[Forms]![NameOfForm]![NameOfTextbox]
 

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