By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,121 Members | 1,706 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,121 IT Pros & Developers. It's quick & easy.

How to generate Query Fields from list box selection

P: 4
Hi

I am constructing an Access Database to produce traffic flow information to validate a traffic model.
I want to have the functionality to select time periods from a list box on a form and then have these applied to a query as the field headings so that the flow data can be outputted for only the specified time periods.

I.e. The user would select one or more time periods from the list box (e.g. 24 Hour flow, 18 Hour flow and 12 Hour flow) then click the command button to apply the selection. The selections would then transfer to the query and list all of the 24 Hour, 18 Hour and 12 Hour flows for all roads in the master table.

I assume this would require some VBA coding, which a have very limited knowledge of.

Thanks in advance
Regards
Mark
Dec 4 '08 #1
Share this Question
Share on Google+
2 Replies


beacon
100+
P: 579
Are you wanting to display the query results so the end user can make additional changes to the values or is this going to be used as a reporting tool?

If you need the query results, you might be interested in learning how to create custom parameter boxes so you can place your list box there. If not, the same idea applies and can be added on a form. You could set it up that when the user selects the item in the list box, the event automatically jumps you to the query, but that's all preference.

I learned how to do the custom parameter boxes on the following website and if I remember correctly it requires little to no VBA knowledge. Just some basic SQL...

Access Tips: Custom Parameter Dialogs

Let me know how it turns out for you or if there's anything else we can do to help.
Dec 4 '08 #2

Expert 100+
P: 1,287
That is an excellent tutorial. Thanks for the link beacon.
Dec 4 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.