ocx calendar

boumbo

Registered User.
Local time
Today, 15:59
Joined
Aug 7, 2010
Messages
44
I am using this calendar so that the user can pick a date from this calendar to put in the text box.

Is it possible i can disable past dates on this calendar so that user can pick dates >=Now() ? if yes, how?


for example when you book vacations online, the internet website will not allow you to select past dates. i want to do something similar on the ocx calendar. is that possible?
 
Not sure about limiting what the user can select in the calendar control but you can test the date the user selected in the text box or where ever you are storing the users selected date. If the date is invalid, remove it and alert the user to try again.
 
Below is a code excerpt that I am using. I use a select statement to provide messages to the user for each case. Tweak as needed. This also uses the ActiveX calendar. I also found that keeping the ActiveX calendar unbound works better.
Private Sub Calendar5_Click()
******
If Me.Calendar5 < #1/1/1976# Then intCaseNumber = 1
If Me.Calendar5 > Date Then intCaseNumber = 2
If Me.Calendar5 > #1/1/1976# And Me.Calendar5 < Date - 31 Then intCaseNumber = 3
*******
End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom