View Single Post
  #4  
Old June 7th, 2010, 09:25 PM posted to microsoft.public.access.forms
nrgins via AccessMonster.com
external usenet poster
 
Posts: 3
Default Form Subform DLookup

Clearer, but still not totally clear.

What triggers this calculation?

Where is TextBox123 -- on the main form or subform?

OK, let's assume that everything happens on the subform (since that's the
easier scenario :-) ). That is, user does something on the subform (enters a
value, clicks a button, whatever) that triggers this calculation, and the
result is then written to TextBox123 on the subform.

In that case, it's simple: in the subform's code module, get the value from
the parent form (ZPCM_form) using the Me.Parent syntax, as follows

Me.Parent!ZPCM_Agreement_Value

If you're not doing everything in the subform, then you'll need to be clearer
in your explanation (and please be clearer in the future so as to avoid all
this back and forth - thanks!).

Neil


John wrote:
Neal,
thanks for your reply.

Let me clarify my thoughts...

My Form: ZPCM_form (has the value i want).
My subform: "Change_Order subform" (needs the calculation).

So, i need to:
1. pull the value in ZPCM_form (ZPCM_Agreement_Value) and
2. add it to Change_Order subform (Previous_Change_Order_Value) and
3. place the new resultant value in TextBox123.

Hope this is clearer.

Your post is not clear. But, to get a value located on the subform from the
main form's code module, use this syntax:

[quoted text clipped - 36 lines]

John


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201006/1