Populating listbox??

gazsharpe101

Registered User.
Local time
Today, 20:03
Joined
Oct 23, 2007
Messages
47
Hi, I have a report that is based on a query and I wish to populate a list box on the report with a value from the query based on the values of 2 other query results, i.e. if [amount]=5 and [quantity]= 3 then add [name] to list box, where amount, quantity and name are query values.

When I run the report, I have to input a parameter, so if I set the list box record thing to the query, then I have to input the same parameter again so I was looking to maybe fill the listbox using VBA.

Thanks for your help.
Gareth.
 
Not crystal clear what you are asking. Generally, if you capture parameters using a form for user input this avoids the repeating parameter issue.
 
Hi, thanks for your reply.

Sorry if I have been unclear, basically I have a query similar to the following:

[name] [amount] [quantity]
John 4 6
Dave 5 5
Emma 4 6
Steve 3 7
Louise 4 6

I want a list box that gives me the [name] when [amount] = 4 and [quantity] = 6, so it would return
John
Emma
Louise.
 

Users who are viewing this thread

Back
Top Bottom