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

Timecards / Work Scheduling

Status
Not open for further replies.

KTPIERCE

Programmer
Jan 20, 2006
3
0
0
US
I need to input startdate enddate parameters, and using these MSAccess data...
[tt]
EmpName, WDay1 Wday2 Wday3 Wday4 Wday5*
Joe 1 2 3 4 5
Fred 2 3 4 5 6
Tom 3 4 5 6 7
[/tt]
*Wday=workday, where 1=sunday 7=Sat, or similar, open to suggestion)

...produce a set of timecards, in one-calendar-week groups, with one card for each employee for each day he works.
For example, if I enter Start=4/16/06,End=4/19/06, I'd want to report
[tt]
Fred 4/17
Fred 4/18
Fred 4/19
Joe 4/16
Joe 4/17
Joe 4/18
Joe 4/19
Tom 4/18
Tom 4/19
[/tt]
I'm a complete newbie to Access; my experience is all mainframe cobol. Can someone get me started?

 
Look at dateadd function and a union query

select empname, dateadd("d",wday1,4/16/2006)as dtdate from mytable
union select empname, dateadd("d",wday2,4/16/2006)as dtdate from mytable
union select empname, dateadd("d",wday3,4/16/2006)as dtdate
etc..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top