update query

  • Thread starter Thread starter Lior Montia
  • Start date Start date
L

Lior Montia

Hi,

I have a button in a form that "on click" occurred
DoCmd.OpenQuery ("my_update_query")

How do I run this update query without any questions or messages ? just to
do the update and that's all.

Thanks.
 
Actually, assuming that my_update_query is the name of a stored query, I
believe you need to use:

Dim qdfUpdate As DAO.QueryDef

Set qdfUpdate = CurrentDb.QueryDefs("my_update_query")
qdfUpdate.Execute dbFailOnError

If you knew the SQL of that update query, then you could use the Execute
method on the Database object.
 

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

Similar Threads


Back
Top