Using 2 multiselect list boxes

  • Thread starter Thread starter kwaldman
  • Start date Start date
K

kwaldman

I'm trying to use 2 multiselect list boxes, the first with a list of
countries, and the second with a list of data points (population, GDP,
etc) and want the user to be able to select from both, then push a
button to get the results.

For example, someone could choose China, Australia, and Rwanda in the
1st box, then population in the 2nd box and the form would generate a
report or filter the table to just those selections.

Any suggestions?

Thanks.
 
Use your multiselect list box as criteria for your country field.

For your data point ( I assume they are in differing fields ) you will need
nested IIF statements.
Data Point: IIF([Forms]![YourForm]![YourListBox] = "Population",
"Population - " & [Population], IIF([Forms]![YourForm]![YourListBox] = "GDP",
"GDP - " & [GDP], IIF([Forms]![YourForm]![YourListBox] = "XXX", "XXX - " &
[XXX], "Error")))
 
I misread your topic title. The second part I posted will not work for a
multi-select list box.

For your data point ( I assume they are in differing fields ) you will need
separate output fields --

Population -: IIF([Forms]![YourForm]![YourListBox] = "Population",
[Population], Null)

GDP -: IIF([Forms]![YourForm]![YourListBox] = "GDP", [GDP], Null)

XXX -: IIF([Forms]![YourForm]![YourListBox] = "XXX", [XXX], Null)
 

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