you can find this info on MS Access Help
On the click event of your command button
Private Sub cmdButtonName_Click()
' here you can type something for error handling
DoCmd.OpenQuery queryname[, view][, datamode]
End sub
hth,
gr
-----Original Message-----
How do I write the syntax to run a query from a command
button in a form?
.