Pass a subform value to another subform?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform frmorder subform with field1, I would like to pass this
value to a subform on this subform called frminventory subform field1.

Any tips?

Brook
 
Thanks for the post, and I tried that but was unable to get it to work? I
don't know if its because my subform2 is located within subform 1, but here
is the code I tried.

Me!frminventory_Subform.Form!RugStatus = Me.invoicetype

Thanks,

Brook
 
Thanks for the post, and I tried that but was unable to get it to work? I
don't know if its because my subform2 is located within subform 1, but here
is the code I tried.

Me!frminventory_Subform.Form!RugStatus = Me.invoicetype

Thanks,

Brook

<snip>

Forgive me if this is old news but SubForms are displayed on forms by
means of a SubFormControl. SubFormControls have names of their own
that do not have to be the same as the SubForm. Often times they are
named the same because that is the default of the wizard but it is not
a requirement. You reference controls on a SubForm by referencing
this SubFormControl first and not the SubForm. So your reference
should be:

Me.SubFormControlName.Form.RugStatus = Me.InvoiceType

If your SubFormControl is named 'frminventory_Subform' then your code
should work.

As a diagnostic, put a visible TextBox on the main form and set the
ControlSource on the data tab to:
=frminventory_Subform.Form.RugStatus
....and see what shows up in the TextBox. That will give you a means
of working out the syntax.

hth
 
Thanks for the post, and I tried that but was unable to get it to work? I
don't know if its because my subform2 is located within subform 1, but here
is the code I tried.

Me!frminventory_Subform.Form!RugStatus = Me.invoicetype

Thanks,

Brook

<snip>
My post assumed your code was running on SubForm1. If your code is
running on the main form of SubForm1 then the syntax is:

Me.SubForm1ControlName.Form.SubForm2ControlName.Form.RugStatus =
Me.invoicetype

hth
 
Thanks for the post, I guess that I am unclear what info I need to post to
clear things up, but I will try, here I go:

frminvoices --> field I would like to pass to frminventory subform is
"invoicetype"
frminvoicedetails subform
frminventory subform --> field "rugstatus"

Hope this is clear...

Sorry for any confusion..

Brook
 
Thanks for the post, I guess that I am unclear what info I need to post to
clear things up, but I will try, here I go:

frminvoices --> field I would like to pass to frminventory subform is
"invoicetype"
frminvoicedetails subform
frminventory subform --> field "rugstatus"

Hope this is clear...

Sorry for any confusion..

Brook

Hi Brook,

Have all of my suggestions failed? Did they do anything? How about
an error of some sort? Did you try the TextBox scheme to work out the
syntax? Only you know what is happening. If you relate the results
of changes you make and the details then I can assist in making
adjustments.

..
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Back
Top