Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running append and delete queries with same parameter

Status
Not open for further replies.

johnnyatyeo

Instructor
Mar 18, 2002
4
GB
I run an append query based on a parameter eg the query simply asks for an order number of a record which is then pasted into another table.
I then run a delete query based on the same parameter to remove the order number record from the primary table.
The two queries are run together from a macro.
How do I stop the parameter prompt coming up twice and pass the variable from the first query to the second preferably withou VB but if no other way .........?!
 
The easiest way would be to create a simple form with a button the runs the macro. Next, create an unbound field on the form to receive the date. Change the queries to use the date from the form.
For example the criteria line of the queries would have something like [Enter your date].
Change that to Forms![yourformname]![formdatefield].

Fill in the date on you form and push the button.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top