Can I use a form to run a query?

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

Guest

I am fairly new to Access, and I have created a form based on a table for
entering data, but I shoul now like to create a form into which I can enter
criteria and run a query, to make things a little easier for other users of
my database. Does any one know if and how this can be done?
Many thanks!
 
hi,
you can do it for a button.
sub runquerynow()
docmd.openquery "queryname", acnormal
end sub
criteria
your can do this 2 ways.
1. in the query's criteria pane put some like this
[input something]
when you run the query, a parameter box with popup.
2. more like your want. in the query's criteria pane put
[forms]![yourform]![textbox1]
this will send the query looking for your form and
whatever in input into textbox1.
 
hi,
you can do it for a button.
sub runquerynow()
docmd.openquery "queryname", acnormal
end sub
criteria
your can do this 2 ways.
1. in the query's criteria pane put some like this
[input something]
when you run the query, a parameter box with popup.
2. more like your want. in the query's criteria pane put
[forms]![yourform]![textbox1]
this will send the query looking for your form and
whatever in input into textbox1.
 
hi,
you can do it for a button.
sub runquerynow()
docmd.openquery "queryname", acnormal
end sub
criteria
your can do this 2 ways.
1. in the query's criteria pane put some like this
[input something]
when you run the query, a parameter box with popup.
2. more like your want. in the query's criteria pane put
[forms]![yourform]![textbox1]
this will send the query looking for your form and
whatever in input into textbox1.
 
Lozzer3374 said:
I am fairly new to Access, and I have created a form based on a table for
entering data, but I shoul now like to create a form into which I can enter
criteria and run a query, to make things a little easier for other users of
my database. Does any one know if and how this can be done?
Many thanks!

Parameter queries. Read the Access Help

(the Contents tab of the Help)

Queries
Creating Queries
Parameter Queries
 
Back
Top