M
Misc
I have a problem concerning the ActiveX Calendar Control (Access 97/2002).
I have a form (Orders) with multiple date fields. Next to each date
field/textbox there is a button/command which will popup/trigger an another
form (Calendar). This second form has a ActiveX Calendar Control in it.
The problem is that I need the second form (Calendar) to then allow the user
to select a date but also to pass the date value back to the calling form
(Orders) and to a specific date textbox.
I need to avoid using the ActiveX Calendar Control in the same form (Orders)
as the date textboxes, that is, the Calendar control needs to be in another
form and pass the date value back. Also, there will be more forms added
soon, which will also require using the Calendar Form, so the Calendar form
should not have anything hard-coded into it referring directly/only to the
Orders form.
Orders Form
====================
Private Sub cmdDate1_Click()
'Popup Calendar Form and allow user to select date, possibly send Calendar
form a default date to start with
'When the Calendar Form is displayed the user should not be able to access
any other form but the Calendar Form
'When user is finished with Calendar form, change txtDate1.value to the
value of the ActiveX Calendar Control
'and close Calendar form
End Sub
Private Sub cmdDate2_Click()
'Popup Calendar Form and allow user to select date, possibly send Calendar
form a default date to start with
'When the Calendar Form is displayed the user should not be able to access
any other form but the Calendar Form
'When user is finished with Calendar form, change txtDate2.value to the
value of the ActiveX Calendar Control
'and close Calendar form
End Sub
Private Sub cmdDate3_Click()
'Popup Calendar Form and allow user to select date, possibly send Calendar
form a default date to start with
'When the Calendar Form is displayed the user should not be able to access
any other form but the Calendar Form
'When user is finished with Calendar form, change txtDate3.value to the
value of the ActiveX Calendar Control
'and close Calendar form
End Sub
Customer Form (Added at a later date)
====================
Private Sub cmdDOB_Click()
'Popup Calendar Form and allow user to select date, possibly send Calendar
form a default date to start with
'When the Calendar Form is displayed the user should not be able to access
any other form but the Calendar Form
'When user is finished with Calendar form, change txtDOB.value to the
value of the ActiveX Calendar Control
'and close Calendar form
End Sub
Calendar Form
======================
Private Sub Form_Unload (Finished or Updated etc)
'Send value of calendar control to specific date textbox in Orders Form
'Close Calendar form
End Sub
I have looked for a solution but to no success. Can someone help me or
point me in the right direction?
Thank you in advance
I have a form (Orders) with multiple date fields. Next to each date
field/textbox there is a button/command which will popup/trigger an another
form (Calendar). This second form has a ActiveX Calendar Control in it.
The problem is that I need the second form (Calendar) to then allow the user
to select a date but also to pass the date value back to the calling form
(Orders) and to a specific date textbox.
I need to avoid using the ActiveX Calendar Control in the same form (Orders)
as the date textboxes, that is, the Calendar control needs to be in another
form and pass the date value back. Also, there will be more forms added
soon, which will also require using the Calendar Form, so the Calendar form
should not have anything hard-coded into it referring directly/only to the
Orders form.
Orders Form
====================
Private Sub cmdDate1_Click()
'Popup Calendar Form and allow user to select date, possibly send Calendar
form a default date to start with
'When the Calendar Form is displayed the user should not be able to access
any other form but the Calendar Form
'When user is finished with Calendar form, change txtDate1.value to the
value of the ActiveX Calendar Control
'and close Calendar form
End Sub
Private Sub cmdDate2_Click()
'Popup Calendar Form and allow user to select date, possibly send Calendar
form a default date to start with
'When the Calendar Form is displayed the user should not be able to access
any other form but the Calendar Form
'When user is finished with Calendar form, change txtDate2.value to the
value of the ActiveX Calendar Control
'and close Calendar form
End Sub
Private Sub cmdDate3_Click()
'Popup Calendar Form and allow user to select date, possibly send Calendar
form a default date to start with
'When the Calendar Form is displayed the user should not be able to access
any other form but the Calendar Form
'When user is finished with Calendar form, change txtDate3.value to the
value of the ActiveX Calendar Control
'and close Calendar form
End Sub
Customer Form (Added at a later date)
====================
Private Sub cmdDOB_Click()
'Popup Calendar Form and allow user to select date, possibly send Calendar
form a default date to start with
'When the Calendar Form is displayed the user should not be able to access
any other form but the Calendar Form
'When user is finished with Calendar form, change txtDOB.value to the
value of the ActiveX Calendar Control
'and close Calendar form
End Sub
Calendar Form
======================
Private Sub Form_Unload (Finished or Updated etc)
'Send value of calendar control to specific date textbox in Orders Form
'Close Calendar form
End Sub
I have looked for a solution but to no success. Can someone help me or
point me in the right direction?
Thank you in advance