Using a combo box to pass information to query

  • Thread starter Thread starter Grant
  • Start date Start date
G

Grant

Hey all,
I am very rusty at my Access programming and have
forgotten how this could be done. I have a form that I am
creating and what I want to do is when a user picks a
value out of a combo box I want that value to be passed to
a query as the selection criteria rather than the user
having to type in the selection criteria each time. Any
help would be appreciated !

Thanks,

Grant
 
Basically, you set up the form with the combo and then set
up the query with something like the following in the
appropriate criteria. If you ope the form and the query you
can just use 'build' to create it but it will be the same
syntax as this.

[Forms]![myform]![mycombo]

hope it helps
 
Grant said:
I am very rusty at my Access programming and have
forgotten how this could be done. I have a form that I am
creating and what I want to do is when a user picks a
value out of a combo box I want that value to be passed to
a query as the selection criteria rather than the user
having to type in the selection criteria each time.

Well, in some cases, you can set the appropriate query
field's criteria to reference the combo box:
Forms!yourformname.yourcomboboxname

and then have the combo box's AfterUpdate event open the
query.
 
Back
Top