Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Using 2 multiselect list boxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kwaldman@gmail.com - 12 Jul 2006 22:18 GMT
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.
KARL DEWEY - 13 Jul 2006 00:26 GMT
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'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,
[quoted text clipped - 8 lines]
>
> Thanks.
KARL DEWEY - 13 Jul 2006 00:31 GMT
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)

> 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,
[quoted text clipped - 8 lines]
>
> Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.