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

Days in a SubReport

Status
Not open for further replies.

yakdogs

Programmer
Aug 13, 2002
40
US
Hello;
I have been working on a database that the employees sign in to and which will generate a timesheet. My problem is getting all 14 days on one sheet. Each day has multiple punchs. Management wants to see all punches.

I figured in order to get all days on the sheet that I was going to have to put first 7 days in on subreport and the second 7 days in an second subreport side by side in the report.

My questions is, how do I set the query for the first to look at first 7 days, so forth with the second?
 
You can use the same subreport for both odd and even weeks. Add a column in the subreport recordsource with an expression like:
WeekOddEven: Format([DateField],"ww") mod 2
Then add to text boxes to your main report:
Name: txtOdd
Control Source: =1
and
Name: txtEven
Control Source: =0
Then add two copies of your subreport on the main report. Set the link master/child properties to;
Master: txtOdd
Child: WeekOddEven
and
Master: txtEven
Child: WeekOddEven





Duane
MS Access MVP
 
Thank you so much. It was a great deal of help, and it is working just fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top