Help using listbox to pass criteria to query

  • Thread starter Thread starter wesley.allen
  • Start date Start date
W

wesley.allen

I admit first that I am not very good using SQL. I am new to Access,
but I am trying to pass a selection in a list box as criteria for a
query. This list box is set to Multiselect "None", so I only need to
pass a single selection to the query. The list box is populated with
months from a table saved as "Month Table". I need to pass the
selection to a query and return all items that occur in that month.
Can anyone help.

Thanks.
 
Have you query use Forms!YourFormName!YourListboxName as its criteria.

(Change YourFormName and YourListboxName to the correct names)
 
Thank you. I have tried this, but my query dows not return any
results. I have added a button created from the toolbox and this
executes the query after I make my selection. It is set to open query.
I assume this is what is making this not work. Any suggestions?

Thanks,

Wes
 
If you do NOT select something in the listbox, you should see all records in
this query - does that work?
 

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

Back
Top