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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to limit records in a report

Status
Not open for further replies.

crisis2007

Technical User
Apr 2, 2007
114
US
I have created a report that gets its data on a query. The query is controlled by certain criteria (date range and others). One of the fields to which data is entered into the database is an employee number. But I want to limit the report results to an employee's shift which is not in the query. Can I filter the records based on a separate table that is not in the original query? I do have a table that lists the employees' names and shifts they work. But I use it for a dropdown list to enter the employee number in the add data form.
 
you should be able to join into the table that lists the names and shifts and only bring back records that relate to that shift.

I don't think adding fields to the query will cause the report to act any differently.

What's the SQL for the report? What's the name of the table that contains the Employee's shift? Does that table also contain the Employee number?

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins
 
Thanks for replying. I figured it out. Once again, I am my own worst enemy. I had some naming problems with my tables and it caused another brain malfunction. When you mentioned that adding fields to the query shouldn't cause the report to act differently, it snapped something in my head to look at my tables again. I appreciate your help!
 
Wow, I didn't know that I could fix brain malfunctions too, that's amazing! Happy Friday!

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top