Macro conditions stop macro

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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]
 
Back
Top