justice8965
Registered User.
- Local time
- Today, 08:20
- Joined
- Aug 25, 2009
- Messages
- 32
Hey all, having some trouble figuring out the best way to do this.
I have a query that is based on an ID number which is in a ComboBox on a form. Basically the user selects the ID, then the query is run based on that ID (the query pulls up their energy usage for the most recent 12 months). The ComboBox contains all of the ID numbers of customers in our database.
What I'd like to do now is populate a table with a 12 month usage history for each client. So, take the 12 months for the first ID number, put it in the table, go to the next ID, repeat etc. until each number in the ComboBox has been used.
How would I go about stepping through the ComboBox and running the query on each number programmatically?
I have a query that is based on an ID number which is in a ComboBox on a form. Basically the user selects the ID, then the query is run based on that ID (the query pulls up their energy usage for the most recent 12 months). The ComboBox contains all of the ID numbers of customers in our database.
What I'd like to do now is populate a table with a 12 month usage history for each client. So, take the 12 months for the first ID number, put it in the table, go to the next ID, repeat etc. until each number in the ComboBox has been used.
How would I go about stepping through the ComboBox and running the query on each number programmatically?