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

D

DMW

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
 
J

John Vinson

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]
 
Top