View Full Version : Function cannot reference a control on sub form


RossG
02-22-2002, 02:17 PM
Here's a problem I would appreciate some urgent advice on!

I'm using a function to grab the date from a calendar control (it's then passed on to a query).

How do I reference the calendar control in the function when the calendar control is on a form (frmCalSearch) which is used as a subform on a tab control (on frmMain) ? <hope you can understand that!>

If I open the frmCalSearch by itself everything works OK, eg:

fcnGetDate = forms!frmCalSearch.ctlCalendar.value

But if I use the same syntax when frmCalSearch is a subform I get a message that Access can't find 'frmCalSearch'

Grateful for any advice !

Jack Cowley
02-22-2002, 02:51 PM
I think you will find your answer here...

http://support.microsoft.com/support/kb/articles/Q209/0/99.ASP?LN=EN-US&SD=gn&FR=0&qry=subforms&rnk=5&src=DHCS_MSPSS_gn_SRCH&SPR=ACC2000