Popup calendar in a form

E

erick-flores

Hello all

I am trying to add a Calendar to my form so the users can select a data
and it would pass the value from the calendar to a control and then
close the calendar

I have the calendar and set the property visible = no. And behind the
date control (on Click event) i have:

Private Sub Period_start_Click()
Calendar4.Visible = True
Me.Period_start = Format(Calendar4.Value, "short date")
End Sub

I know I need some more code, I am just not sure what to do. The
calendar will load fine and a date will pass to the date control, but
then I am not able to change the date and of course the calendar is not
closing. So i guess my question are:

(1)When click on the calendar, how to pass the value from the calendar
to the datacontrol
(2)How to close the popup calendar once I have entered the right date


Thanks in advance
 
G

Guest

Is Calendar4 the name of your form? If so, you haven't indicated what control
on that form holds the value: Format(Calendar4!DateControl.value, "shortDate")
 
E

erick-flores

smk23 said:
Is Calendar4 the name of your form? If so, you haven't indicated what control
on that form holds the value: Format(Calendar4!DateControl.value, "shortDate")

No, Calendar is not the name of the form. The name of my form is
"Expense Report"
Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top