Combining an update query with a parameter query

J

jenster84

I wanted to know how you can update data in a table using the update query
and a parameter query.
 
A

Allen Browne

How did you want to run this update query?

In query design, you can just put your parameter in the query.
To run it programmatically, you can then use RunSQL in a macro or code.

A better programmatic approach might be to build the SQL statement in code,
concatenating the parameter value into the string. Then Execute the string
itself: you don't need a saved query. The advantage is that you know whether
it worked or not. Here's an example:
Action queries: suppressing dialogs, while knowing results
at:
http://allenbrowne.com/ser-60.html
 

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