assuming that the objects are on teh same form, then you don't really need
ther "me" thing
Private Sub Calendar1_Click()
Label1.Caption = Format$(Calendar1.Value, "ddd mm yyyy")
End Sub
"access user" wrote:
in my code please ignore the first section as it is headed with ' (I was just
trying that out). So the code I am using and that does not work is:
Me.txtPeriodFrom.ControlSource = Format(Calendar1.Value, "mmmm dd, yyyy")
tia
James
"access user" wrote:
Hi
Thanks for your response, however it does not work. I have the following code:
Private Sub EnterDate()
'Me.txtPeriodFrom.ControlSource =
Worksheets("InputDataEntry").Range("A1").Value
Me.txtPeriodFrom.ControlSource = Format(Calendar1.Value, "mmmm dd, yyyy")
End Sub
Where I have "ControlSource" is where you had "caption" in your suggestion.
Caption was not recognised.
Any other suggestions?
tia
James
"Dave Peterson" wrote:
Maybe something like:
Me.label1.caption = format(calendar1.value,"mmmm dd, yyyy")
access user wrote:
Hi
I have followed the link that RondeBruin gives to this site
http://www.fontstuff.com/vba/vbatut07.htm
which shows how to add a calendar control. However I want to pass the date
from the calendar to a field on a form (the calendar and field in question
are both on the same form). The info on the above link only shows how to pass
it to an active cell on the worksheet.
Would appreciate any help.
tia
James
--
Dave Peterson