open query with VB code

B

BLTibbs

I want to open/run an update query from a command button (comand28) in a form
(accountingform).

I am a beginner and need the the code to do that?

Thanks
 
O

Ofer

One more thing
If you don't want any messages to be displayed when the query runs, the use
that

Docmd.SetWarnings False
Docmd.OpenQuery "QueryName"
Docmd.SetWarnings True
 
Top