Function cannot reference a control on sub form

RossG

Registered User.
Local time
Today, 00:01
Joined
Apr 18, 2001
Messages
21
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 !
 

Users who are viewing this thread

Back
Top Bottom