Greetings,
I am working on a simple Access 97 app to track leave usage by employees.
There is a Form (f_Employees) and a SubForm (sbfrm_Leave).
The Main Form has employee info, and an Unbound Calendar Control (MSCAL.Calendar.7).
The SubForm has the dates leave was taken (DFrom and DTo). I already have code that makes the Calendar visible when the DFrom field is entered, and if the DFrom field is updated, the Calendar will vanish. I have the same code behind the DTo field.
Private Sub From_Enter()
[Forms]![f_Employees].CalendarControl.Visible = True
Private Sub To_AfterUpdate()
[Forms]![f_Employees].CalendarControl.Visible = False
This is what I want to do:
1. When the DFrom field is entered, have the calendar Visible, allow supervisor to click on a date on the calendar, and have this date inserted into the appropriate date field .. either DFrom or DTo.
2. Also have Time fields (TFrom and TTo), Short Time format. Need to calculate the number of hours taken, especially if the DFrom and DTo span more than 1 day.
I've been reading the posts concerning the Calendar control. Wondering if I need a Command Button to click allowing the supervisor to input the selected date. I'm trying to make this as idiot proof as possible.
Thanks in advance. If anyone replies to this today (28 may), please send to the dfas.mil address, as I cannot check any responses sent to my home email address.
Bob
robert.cole@dfas.mil
aries170@comcast.net
[This message has been edited by indyaries (edited 05-28-2002).]
I am working on a simple Access 97 app to track leave usage by employees.
There is a Form (f_Employees) and a SubForm (sbfrm_Leave).
The Main Form has employee info, and an Unbound Calendar Control (MSCAL.Calendar.7).
The SubForm has the dates leave was taken (DFrom and DTo). I already have code that makes the Calendar visible when the DFrom field is entered, and if the DFrom field is updated, the Calendar will vanish. I have the same code behind the DTo field.
Private Sub From_Enter()
[Forms]![f_Employees].CalendarControl.Visible = True
Private Sub To_AfterUpdate()
[Forms]![f_Employees].CalendarControl.Visible = False
This is what I want to do:
1. When the DFrom field is entered, have the calendar Visible, allow supervisor to click on a date on the calendar, and have this date inserted into the appropriate date field .. either DFrom or DTo.
2. Also have Time fields (TFrom and TTo), Short Time format. Need to calculate the number of hours taken, especially if the DFrom and DTo span more than 1 day.
I've been reading the posts concerning the Calendar control. Wondering if I need a Command Button to click allowing the supervisor to input the selected date. I'm trying to make this as idiot proof as possible.
Thanks in advance. If anyone replies to this today (28 may), please send to the dfas.mil address, as I cannot check any responses sent to my home email address.
Bob
robert.cole@dfas.mil
aries170@comcast.net
[This message has been edited by indyaries (edited 05-28-2002).]