can't refer to control on subform

B

Brian

I am using a minicalendar which when clicked will put a date in a field on
the form. I have had no problem with this until the field and the calendar
control were put on a subform. I have tried many variations with no luck.

My subform is [f builder schedule] and control is [1st Walk]
My main form is called [f builder schedule]

I get an error saying access cannot find my form.

Private Sub Command82_Click()
'Call the MiniCalendar to set the date
Call fMiniCalendar(, , "[f builder schedule]", "[1st Walk]")
End Sub

Please help.
 
F

freakazeud

Hi,
it would probably help if you post the code you have in your function
'fMiniCalendar', but most likely you need to change your syntax to reference
to the control on the subform. Check this site for all referencing issues:
http://www.mvps.org/access/forms/frm0031.htm

So if you are calling this function from your main form and are trying to
set a value in the subform then you would need to use:

Me![f builder schedule].Form![1st Walk]

HTH
Good luck
 
Top