Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: How to reference a control on 2nd subform


Message #1 by "M.Puk" <M.Puk@x...> on Mon, 25 Feb 2002 21:55:52 +1300
This is a multi-part message in MIME format.



------=_NextPart_000_0016_01C1BE47.313B2640

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



Hi all,

    I have a form that has 2 subforms.  On each of the subforms I have 3 

calculating(unbound) textbox's. Both subforms are displayed as 

continuous forms set up to look like datasheets so I have header and 

footer areas for various totals boxes. The forms are set up as follows.

Both the sub forms are linked to the main form via a jobnumber field so 

the 2 subforms are not connected to each other.



The forms are called,

                                       

Main form called:            frmjobs                 Has an unbound 

textbox called txttotalcosts

First subform called:       frmdetails              Has an unbound 

textbox called txtjobtotal

Second subform called:  frmPayments         Has an unbound textbox 

called txtpaid



In txttotalcosts on the frmjobs the following expression in the control 

source give me the

data from the txtjobtotal on the subform frmdetails, no problems



=3D[Forms]![frmjobs]![frmdetails]![txtjobtotal]



PROBLEM,  How do I write the expression in the control source so that 

the txtpaid box on the second subform will display the data from 

txtjobtotal on the first subform. There's heaps of help on referencing a 

subform but nothing about referencing another subform within the same 

main form.



I keep getting ?NAME errs



Thanks in advance,

     Murray Puklowski

            M.Puk@e...

                                              
















Message #2 by Omar Chaudry <OChaudry@b...> on Mon, 25 Feb 2002 08:55:03 -0000
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C1BDDA.1D7D0FA0

Content-Type: text/plain



The way I get around that is by referencing the field in the master form

first and then referencing this in the second sub-form. So in your scenario

reference txtpaid in frmjobs first in an unbound text box (you can hide it

as well) and then reference this text box control in the sub-form

frmdetails.



 



HTH



 



Omar



 



-----Original Message-----

From: M.Puk [mailto:M.Puk@x...] 

Sent: 25 February 2002 08:56

To: Access

Subject: [access] How to reference a control on 2nd subform



 



Hi all,



    I have a form that has 2 subforms.  On each of the subforms I have 3

calculating(unbound) textbox's. Both subforms are displayed as continuous

forms set up to look like datasheets so I have header and footer areas for

various totals boxes. The forms are set up as follows.



Both the sub forms are linked to the main form via a jobnumber field so the

2 subforms are not connected to each other.



 



The forms are called,



                                        



Main form called:            frmjobs                 Has an unbound textbox

called txttotalcosts



First subform called:       frmdetails              Has an unbound textbox

called txtjobtotal



Second subform called:  frmPayments         Has an unbound textbox called

txtpaid



 



In txttotalcosts on the frmjobs the following expression in the control

source give me the 



data from the txtjobtotal on the subform frmdetails, no problems



 



=[Forms]![frmjobs]![frmdetails]![txtjobtotal]



 



PROBLEM,  How do I write the expression in the control source so that the

txtpaid box on the second subform will display the data from txtjobtotal on

the first subform. There's heaps of help on referencing a subform but

nothing about referencing another subform within the same main form.



 



I keep getting ?NAME errs



 



Thanks in advance,



     Murray Puklowski



            M.Puk@e... <mailto:M.Puk@e...> 



                                               



 



 



 



 












  DISCLAIMER: The information in this message is confidential and may be

legally privileged. It is intended solely for the addressee.  Access to this

message by anyone else is unauthorised.  If you are not the intended

recipient, any disclosure, copying, or distribution of the message, or any

action or omission taken by you in reliance on it, is prohibited and may be

unlawful.  Please immediately contact the sender if you have received this

message in error. Thank you.









  Return to Index