Query help please

Manaz

Registered User.
Local time
Today, 14:59
Joined
Feb 19, 2007
Messages
24
I have a data base with three tables regarding:

shops (table one),
their doors (table two) (automatic doors),
and the repairs done on each of the doors (table three)

There are over two hundred stores in the data base and I have to write a summation query for the repair costs for each store.

I was wondering if it is possible to create a query with an inteface (like a form) and include a combo box where a store can be chosen from a list to run the query on?

otherwise im thinking i have to wtire an individual query for each store:mad:

Does anyone know how to do this or know of a better way around my problem?

Thanks:)
 
Do you want all the costs, store by store, or just the costs of a single store that you can pick from a list?
 
im trying to have it so all you have to do is choose the store from a list and the query will display all the repairs completed at that store with costs and total costs
 
Sure, you just have to reference the control of the form in you criteria. For example we will say your form name is Form1 and you combobox is name cmb1. The below expresion would go in the criteria for you Business name.

forms!Form1!cmb1
 
If you're thinking that the form option you cite is the only alternative to writing a seperate query for each one, that is not accurate.

You can write a GROUP BY query that will group all stores and the sum of repairs for each store.

All stores with repairs would be in results with the total of repairs.

If you like the form interface, you could then build a form off that query and scroll through one at a time, or view the columnar style.
 

Users who are viewing this thread

Back
Top Bottom