How do I pass multiple parameters from a form using list boxes?

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

Guest

I have a form with multiple list boxes where I select various items.
I need to pass these to another form to display the information.
I also need to know how to set a parameter to a value that will select all
records dealing with that field if no selection is made with the list box.

Thans
 
I have a form with multiple list boxes where I select various items.
I need to pass these to another form to display the information.
I also need to know how to set a parameter to a value that will select all
records dealing with that field if no selection is made with the list box.

Thans

You'll need to write VBA code to step through the ItemsSelected
collection of the listbox, and build a SQL string. A multiselect
listbox does not have a "value" and you cannot simply reference it as
a parameter.

See http://www.mvps.org/access/forms/frm0007.htm for sample code.

John W. Vinson[MVP]
 

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