Create query using a form

C

czr

I wanted to ask if there is a way to generate a query using a form?
The qualifiers or criterias would be entered in the form then I would create
a commard button to say run.

Thanks
 
S

Sean Timmons

You could do a couple things.

You could create a regular query, then run the query once the button is
clicked.

You could create a SQL string and have the command button run the SQL query
within the form.

I prefer the former, as any changes that are required may be more easily
done that way.

Private Sub Run_Query_Click

DoCmd.OpenQuery QueryName acViewNormal

End Sub

Build in any error trapping you'd like...
 

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