Queries and List Box (1 Viewer)

LHolden

Registered User.
Local time
Today, 16:40
Joined
Jul 18, 2012
Messages
73
I have a form which lists names of Agents and the Agencies which they work for. I currently have a combo box which allows the user to pick a specific Agency, so they can view only those agents, and a list box which I want to list the name of the Agents so the user can choose some of them, but doesn't have to choose all of them, or only one. I cannot, however, figure out how to word the criteria for the query that populates the list box so that it shows all of the names. Everything I've tried so far returns only the first name on the form.

Thanks in advance for the help.
 

pr2-eugin

Super Moderator
Local time
Today, 21:40
Joined
Nov 30, 2011
Messages
8,494
Hello LHolden, have you heard of "Building Queries on the Fly?"

Normally with ListBoxes, I would create a Dynamic Query using the QueryDef object.. instead of running an Inbuilt Query.. But that is just me.. :cool:

Other way to do would be to Create an Invisible Text box Control that will obtain the result of your ListBox with the appropriate AND/OR logical operator in between them and then use that TextBox as the Criteria of the Query..
 

Users who are viewing this thread

Top Bottom