A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Transfer A value from a subform to the form



 
 
Thread Tools Display Modes
  #1  
Old September 17th, 2009, 08:08 AM posted to microsoft.public.access.forms
ashraf_al_ani
external usenet poster
 
Posts: 1
Default Transfer A value from a subform to the form

Dear All
i have form and subform there is a calculated field in the subform
I want to transfer this value to a bound field in the main form and this
value is updatable (i mean every time the calculated field is changed the
value in the main field updated directly)


please any idea to help me

best reagrds

  #2  
Old September 17th, 2009, 10:16 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Transfer A value from a subform to the form

Is this something like a total, where the data would be messed up if the
value didn't match?

If so, you must not store the value in the main form's total. Doing so
violates the most basic rules of data normalization.

If it could be meaningfully different, you will need to use the AfterUpdate
and AfterDelConfirm event procedures of the subform to calculate the value,
and assign it to the text box on the parent form.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"ashraf_al_ani" u54845@uwe wrote in message news:9c3dfeaed4b1e@uwe...
Dear All
i have form and subform there is a calculated field in the subform
I want to transfer this value to a bound field in the main form and this
value is updatable (i mean every time the calculated field is changed the
value in the main field updated directly)


  #3  
Old September 17th, 2009, 06:46 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Transfer A value from a subform to the form

On Thu, 17 Sep 2009 07:08:55 GMT, "ashraf_al_ani" u54845@uwe wrote:

Dear All
i have form and subform there is a calculated field in the subform
I want to transfer this value to a bound field in the main form and this
value is updatable (i mean every time the calculated field is changed the
value in the main field updated directly)


please any idea to help me

best reagrds


Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or just as you're now doing it -
in the control source of a Form or a Report textbox.

--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.