Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing values between 2 subforms 1

Status
Not open for further replies.

roystreet

Programmer
Oct 12, 2000
146
US
Hello,
I am trying to populate fields from one sub form to another via a click of a button. I'm not quite there yet, trying several things it hasn't worked. I have searched through the forum & I just don't see what I'm looking for.

I'm not trying to pass values from the parent to a sub form, but rather between sub forms.

For instance:
In subfrm1 there is a field named cboAddress1

I want a button to be able to pass that value to a field in subfrm2 named txtAddress

I hope this is easily understood? Any ideas?

Thanks,
~roystreet
 
Depending on where the button is

button on parent

me.subfrm2.form.txtAddress= me.subfrm1.form.cboAddress1


button on subfrm2
me.txtAddress= me.parent.subfrm1.form.cboAddress1

button on subfrm1
me.parent.subfrm2.form.txtAddress= me.cboAddress1
 
Hello pwise,
Thank you very much for your help! I greatly appreciate it. I will not be able to test it today, but from what I see it looks exactly like what I needed. I never tried the "me." vb, I kept testing with "FORM_" (Those types of code)

~roystreet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top