List Boxes

B

Barkley

Hi,

I'm trying to create a form that will have three list boxes. When values are
selected in each of the three list boxes I would like a command button to
generate a query that will return a table of values that holds information
according to the values selected in the list boxes. For example, if list box
one is Date and the value selected is '2007', and list box two is Fruit and
the value selected is 'Apples,' and list box three is Sales and the value
selected is 'Quantity,' the command button will trigger a query to retrieve a
table that will tell me how many apples were sold in 2007. Any ideas would be
greatly appreciated...

Thanks,

Barkley
 
K

Ken Snell \(MVP\)

Perhaps this sample database will be helpful. It shows how to use various
controls on a form as the filters for a query (the VBA programming builds a
WHERE string based on the data entered/selected in the controls), and then
passes that WHERE string to DoCmd.OpenReport action -- but can be modified
to use for showing a query's results directly.
http://www.accessmvp.com/KDSnell/SampleDBs.htm#FilterForm
 
B

Barkley

I think that should do it... thanks Ken
Perhaps this sample database will be helpful. It shows how to use various
controls on a form as the filters for a query (the VBA programming builds a
WHERE string based on the data entered/selected in the controls), and then
passes that WHERE string to DoCmd.OpenReport action -- but can be modified
to use for showing a query's results directly.
http://www.accessmvp.com/KDSnell/SampleDBs.htm#FilterForm
[quoted text clipped - 16 lines]
 

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

Top