1 reply
by richtee
Add the activeX Calendar to your form ? for this example, name it ?axcStartDate?
Add a command button to your form ? for this example, name it ?cmdStartDateCal?
Add an unbound Text Box control to your form ? for this example, name it ?txtStartDate?
Put the following code in the Form Load event
Private Sub Form_Load()
DoCmd.Maximize
axcStartDate.Visible = False
End Sub
Put the following code in the Command button OnClick event:
Private Sub cmdStartDateCal_Click() 'make StartDate Calendar visible and open to today?s date
axcStartDate.Value = Now()
axcStartDate.Visible = True
End Sub
Put the following code in the Calendar?s AfterUpdate event:
Private Sub axcStartDate_AfterUpdate()
'set Start Date
txtStartDate.Value = axcStartDate
axcStartDate.Visible = False
End Sub
You can now take this further in many different ways. Good Luck. Rich
This discussion is closed to new replies.
Trending Software posts
Sort by Trending