I know this must be possible, but I am drawing a blank on how to go about it.
I have an employees table that, along with other data, contains what shift and team they are on. The shift is just a 1, 2 or 3, while the team code is something like "QT", "DT", etc.
I also have a report that is a daily "Production Efficiency Report" of sorts. It has been requested of me to have the ability to batch print the production reports for each shift/team combination. I could go in and just hard code each one, but that just seems like terrible programming to me.
So instead, what I think would be good would be a query that returns employees for a specified shift/team combination (the easy part) and then using the record set returned from that query, run the production report for each returned employee ID. (The part I can't figure out how to do)
So for example, my query returns:
Employee 214 - 1st, QT
Employee 217 - 1st, QT
Employee 309 - 1st, QT
I then would want to automatically run the report 3 times, once each for 214, 217 and 309.
I'm sure this is doable, and I really feel like I am missing something obvious here.
Can anyone help me out?
Brooks Tilson
Database Development
Tilson Machine, Inc.
I have an employees table that, along with other data, contains what shift and team they are on. The shift is just a 1, 2 or 3, while the team code is something like "QT", "DT", etc.
I also have a report that is a daily "Production Efficiency Report" of sorts. It has been requested of me to have the ability to batch print the production reports for each shift/team combination. I could go in and just hard code each one, but that just seems like terrible programming to me.
So instead, what I think would be good would be a query that returns employees for a specified shift/team combination (the easy part) and then using the record set returned from that query, run the production report for each returned employee ID. (The part I can't figure out how to do)
So for example, my query returns:
Employee 214 - 1st, QT
Employee 217 - 1st, QT
Employee 309 - 1st, QT
I then would want to automatically run the report 3 times, once each for 214, 217 and 309.
I'm sure this is doable, and I really feel like I am missing something obvious here.
Can anyone help me out?
Brooks Tilson
Database Development
Tilson Machine, Inc.