Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar control help - it won't send the value on the click event

Status
Not open for further replies.

ciskris

Programmer
Jun 22, 2001
13
0
0
US
I am having trouble with a calendar control on a form that pops-up when a user enters a date text box. First I am getting an error about the on load event for the form because that is where I set the date for the calendar to today's date. Then once I cancel the error message, it does put the date as today's date. But it does not send the value of the date that is clicked to the text box if the user is choosing a different date. Please advise and I will post the code as follows:

Private Sub Form_Load()
Calendar.Value = Date

Private Sub Calendar_Click()
txtDate.value = calendar.value

Please help anyone!!!! Thanks in advance.
 

Private Sub Form_Load()
Calendar.Today
End Sub

Private Sub Calendar_Click()
Me!TxtDate = Calendar.Value
end sub

This should work... Hope that I help you with your prob..
Inform me if it doesn't work...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top