Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Query!!!!!

Status
Not open for further replies.

jdwm2310

Technical User
Jul 26, 2001
396
0
0
US
Hi,

I would like to create a query that looks up the data for a specific business unit. I have three tables:
tblCostCenter - has the costcenter #
tblBusinessUnit - has the name of the businessunit per costcenter
tblHelpDesk - is the form that everyone will use. The user will enter the costcenter#.
These tables are all related by BusinessUnitID

I want to create a query using these three tables to populate the business unit. So if I enter a "HR" all the tickets created that was in the costcenter of 3000-4000 will be labeled as HR.

I have establish which cost center belongs to what business unit but I just don't know how make it work on a query..Any suggestions would be greatly appreciated. thanks
 
Hi,

You will need to ensure you have set the relationship between all 3 tables before continuing.
The easiest way would be to create a query under the queries tab. Press the new button on the right and its up to you but it might be easier to select the simple query wizard. Select each table and the fields you want in the query.

The next problem is that i am not sure of the HR bit. I take it that all records between the costcentre codes mentioned are already taged with HR.

Once the query has been created open it in design mode. I think the best way to generate the info you want would be to place a parameter on the costcentre code.
This can be done by placing the following into the criteria section of the query -

Between [First CostCentre] and [Second Costcentre]

When the query is run the user is promted for the relevant information and only those records are returned.

I hope that this may help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top