473,668 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Referring to a control in the subform footer

166 New Member
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 in the subform footer of the form F_MixDesign.
Form1: F_MixDesign
Subform1: SF_MixSample
Control name: txtWaterReqWt

Form2:FSampleRe quest
Subform2: SF_SampleReques t
Control name: txtWater

Both the control I would like to copy and the control that will be copied to are in the subform footers.

I have a button on form1 that when clicked will open form2. Here is my code, but I know it's wrong because it doesn't work.

Private Sub btnOpenSampReq_ Click()

DoCmd.OpenForm "F_SampleReques t"
'Open F_Sample Request

Forms!F_SampleR equest.Controls !txtWater = Forms!F_MixDesi gn.Controls!Lis tWater
Forms!F_SampleR equest.Controls !txtWatReqWt = Forms!F_MixDesi gn.Controls!txt WaterReqWt
End Sub

I have also tried using:
Me!SF_SampleReq uest.Controls!t xtWater = Me!SF_MixDesign .Controls!ListW ater
Dec 10 '08 #1
2 4111
ChipR
1,287 Recognized Expert Top Contributor
From here:
Forms: Refer to Form and Subform properties and controls

Forms!Mainform! Subform1.Form!C ontrolName = Me!Subform1.For m!ControlName

so

Forms!FSampleRe quest!SF_Sample Request.Form!tx tWater = SF_MixSample.Fo rm!txtWaterReqW t
Dec 10 '08 #2
csolomon
166 New Member
Chip,

You are wonderful! Thank you.

I tried to use that reference initially, but I can't understand it really...thank you
Dec 10 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1990
by: Bruce | last post by:
Hi, I have 3 nested forms and wish to calculate a value on Subform 1 by adding 2 values on the same subform + to a value in a control on the footer of the underlying subform . I use this as the recordsource for my total =.Form!Sumpd++) which works well except when there are no records in the transactiontbl subform - I get an error.
30
8896
by: Shannan Casteel via AccessMonster.com | last post by:
I have a subform named "sbfrmParts" with a list of parts along with the quantity and price. I have used a text box in the subform's footer and set the control source to "=Sum(*)". I set the format to display currency. This text box is called "SubformTotal", and is visible property is set to "No". On the main form I have made another text box and set its control source to "=.Form!SubformTotal". When I enter some parts everything works...
6
5877
by: dhowell | last post by:
I have a "form" and "subform" where I would like a calculated control on the form which sums the values of a datasheet column of the subform. (datasheet on subform may have a variable number of entries) I can't seem to get the calculated control on main form to do what I want...... Is this possible, if so, how? Help!
6
96078
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 want to act as a Sub-Form of the main one. That is to say, if you wanted frmB to act as a Sub-Form of frmA, then you would create a Subform control on frmA (in this example we'll call it sfmB). Subforms have a .Form property which contains a...
3
2406
by: virtualgreek | last post by:
Dear all, I have a scenario that is driving me nuts. (MS Access 2003) I have a form/subform (Continuous form) where it gets its data from tables Order and Order_Details. In the footer section of the subform I have a hidden textbox named txtOrder_Total_Amount which displays the total of the whole order. On the main form I have a bound contol from the Order table, namely Order.Order_Total_Amount_Euro On the subform I have fields such...
2
1558
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 have a unbound textbox (TGWP_Sub) that calculates a subtotal of the records that are displayed. In the main form I have another unbound text box (TGWP_Main) that I want to display the value of "TGWP_Sub" In the load event of the Main form I have...
6
5078
by: colin spalding | last post by:
Access 2003 I subform which lists financial transactions for a client in the main form, which i total in a textbox named "txtTotalPremium" in the subform footer with the Control Source "=Sum()"; without quotations of course. This works fine until the subform has no records to return in which case textbox is blank. That would be fine except I need to use the figure in another text box on the main form as part of another calculation. I...
4
2794
by: colin spalding | last post by:
Access 2003 I posted this last week; unfortunately, none of the suggested solutions cured the problem I have a subform which lists financial transactions for a client in the main form, which I total in a textbox named "txtTotalPremium" in the subform footer with the Control Source "=Sum()"; without quotations of course. This works fine until the subform has no records to return, in which case textbox result is blank. That
56
5021
by: csolomon | last post by:
Hello: I have something I would like to do and I was wondering if tab controls was the best route to accomplish it. I have 5 categories of material types. I created the application from an excel sheet that had the categories listed. My boss would like my form to be as close as possible to the excel sheet. He would like for each material to be input by material type separately, which is currently not how I have it set up. currently, you...
0
8374
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8890
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.