473,322 Members | 1,232 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Referring to subform

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
1 1377
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Salad | last post by:
I have a sub routine that I'd like to use to get data from a main form or from a subform preferably using 1 variable. Ex: If Me.OpenArgs = "SF" Then strForm = "MF!SF" Else strForm = "MF"...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
2
by: pietlinden | last post by:
I have a hopefully stupid question. First off, I'm trying to follow Keri Hardwick's instructions from here: http://www.mvps.org/access/forms/frm0031.htm I have a main/sub1/sub-subform:...
4
by: MLH | last post by:
I have a report and on it, a subreport control Main Report Name: rptInvoiceMain Sub Report Name: rptInvoiceSubReport SubReport Control Name: rptInvoiceSubReportCtl The...
6
NeoPa
by: NeoPa | last post by:
Introduction The first thing to understand about Sub-Forms is that, to add a form onto another form takes a special Subform control. This Subform control acts as a container for the form that you...
3
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent...
2
kcdoell
by: kcdoell | last post by:
Hello: I have read various posts on this subject but still can not get mine to work. Basically I have a Main form (Forecastform) with a subform (Forecast_Subform). In the footer of the subform I...
2
by: csolomon | last post by:
Hello: I would like to use information on one form to populate another form. There are 2 controls I would like to transfer; a list box control and a text box control. both are unbound controls...
3
by: csolomon | last post by:
Hello, I would like to copy a calculated control of an unbound control on to a report. On my form (F_SampleRequest) i have a button which opens the report. Here is the code for the button: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.