How to run Update query in Access Switchboard?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Trying to Update tables via update query to be run from a switchboard button
(will also need delete type queries too) - but forms only create/work with
select type query and not Action types. Macro and Code dont run update query
direct. Do I need to make a macro as such? Thanks.
 
Code can run an update query.

CurrentDb.Execute "QueryName", dbFailOnError

This will run the query named or you could replace the name with SQL. There
will be no warning, it will just run. The dbFailOnError will generate an
error message if the query should fail. This can be use with any "action"
query (update, delete, append, etc).
 

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

Back
Top