By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,392 Members | 1,516 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,392 IT Pros & Developers. It's quick & easy.

Calendar Control

P: n/a
I cant seem to set the date on the calendar control. What i want to
happen is have a form pop up when a button is clicked (have that part of
course). This for has a calendar control on it. I have the code to
pass the date selected back to the original form working just fine. I
want to have the calendar start with whatever the current date is as the
selected date -or- a specificed date passed to the form (by a global
variable) based on a condition. I know how to test the condition with
an IF loop. I just can't seem to set the date on the calandar control
when the form opens. Any help please?
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ima Lostsoul <me@myprovider.com> wrote in message news:<MP************************@netnews.comcast.n et>...
I cant seem to set the date on the calendar control. What i want to
happen is have a form pop up when a button is clicked (have that part of
course). This for has a calendar control on it. I have the code to
pass the date selected back to the original form working just fine. I
want to have the calendar start with whatever the current date is as the
selected date -or- a specificed date passed to the form (by a global
variable) based on a condition. I know how to test the condition with
an IF loop. I just can't seem to set the date on the calandar control
when the form opens. Any help please?

In the On Open event of your calendar control put this code.

Private Sub SelectDate_Open(Cancel As Integer)
Forms!frmYourFormName!CalendarControlName.Value = Date
End Sub

This will open the calendar control with the current date. I think you
will find that the calendar control does not have its own open event
procedure, so Just type the code in.

David
Nov 12 '05 #2

P: n/a
In article <MP************************@netnews.comcast.net> ,
me@myprovider.com says...
I cant seem to set the date on the calendar control. What i want to
happen is have a form pop up when a button is clicked (have that part of
course). This for has a calendar control on it. I have the code to
pass the date selected back to the original form working just fine. I
want to have the calendar start with whatever the current date is as the
selected date -or- a specificed date passed to the form (by a global
variable) based on a condition. I know how to test the condition with
an IF loop. I just can't seem to set the date on the calandar control
when the form opens. Any help please?

Never mind. I was being stupid...
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.