start and end times graphically

G

Guest

I have a query that has three fields ... emp, start and end. The start is
the time the employee is schedule to work and end is the time the employee is
scheduled to quit. I would like a report that shows graphically when
employees are scheduled. For example:

emp start end
100 7:00 9:00
101 9:00 11:00
102 8:00 10:00

emp times

7:00 8:00 9:00 10:00 11:00

100 .....................................
101
.........................................
102 ................................

(Boy, I hope that appears as I typed it!) Is this possible?

I'm using Access 2007. Thanks.
 
M

Marshall Barton

margaret said:
I have a query that has three fields ... emp, start and end. The start is
the time the employee is schedule to work and end is the time the employee is
scheduled to quit. I would like a report that shows graphically when
employees are scheduled. For example:

emp start end
100 7:00 9:00
101 9:00 11:00
102 8:00 10:00

emp times

7:00 8:00 9:00 10:00 11:00

100 .....................................
101
........................................
102 ................................

I'm using Access 2007. Thanks.


Basically, it's a Ghant chart. Use the detail section's
Format event to adjust a solid BackStyle, BackColor of
choice, text box's Left and Width properties. First,
determine the scale of twips per minute of the shift
duration. Then position the 7 am label control where you
want the 7am line to start,

Const TPM As Long =15 'twips per minute
Dim lngStartPos As Long
Dim lngDur As Long

lngStartPos = TPM * DateDiff("n", #7:00#, Me.Start)
lngDur =TPM * DateDiff("n", Me.Start, Me.End)
Me.txtBar.Left = lbl7am.Left + lngStartPos
Me.txtBar.Width = lngDur
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top