By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 1,945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

Referring to subform

P: n/a
Jon
I am trying to refer to a subform using the following code:

strCurrentSubForm = "fsubADREnquiriesListAllEnquiries"
strTo = Forms("frmADREnquiriesListMain")(strCurrentSubForm ).Email

I get an error message that says Access can't fid the field
fsubADREnquiriesListALLEnquiries referred to in your expression.

Any idea why?

The field called Email does exist on the subform. The subform is in list
view if that makes any difference.

Thanks,

Dave
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Jon wrote:
I am trying to refer to a subform using the following code:

strCurrentSubForm = "fsubADREnquiriesListAllEnquiries"
strTo = Forms("frmADREnquiriesListMain")(strCurrentSubForm ).Email

I get an error message that says Access can't fid the field
fsubADREnquiriesListALLEnquiries referred to in your expression.

Any idea why?
Is that the name of the control? You must use the name of the
subformcontrol here. Also, do

Forms!yourform!yoursubformcontrol.form!yourfield

The subform is in list
view if that makes any difference.


No, I don't think that makes any difference.

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.