5 replies
by dklippert
Use Tools>ActiveX Controls Calendar Control.
For a Command button use the Toolbox. It's the Hammer and Wrench icon on the Standard tool bar.
by compumedic
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
by compumedic
by compumedic
This discussion is closed to new replies.
Trending Software posts
Sort by Trending