Transfer of a value

bugman

Registered User.
Local time
Today, 17:15
Joined
Dec 23, 2004
Messages
31
You'll have to forgive me I kinda new at this. I have a form with a non linked subform on it. The main form has one control on it called CustomerID, the subform's record source is from a select query that is updated by a cmdButton on the main form. The cmdButton runs an update query. One of the controls in the subform is called CustomerID, this control has no other purpose than to hold the same value that the main forms control (CustomerID) has. I want the cmdButton's OnClick event to transfer the value from the mainform CustomerID and place it into the subform CustomerID. Any help on this would be greatly appreciated.
 
Define a variable in the On Click event of your button.
Fill the variable with the "current" CustomerID and seed it into the control on your subform.

However... you're saying that in fact your subform IS linked to your main form (as it normally should be).
I should reconsider your approach on this one.

RV
 
I don't think that I can link the main to the sub because of the way the info is gathered. You said....

Fill the variable with the "current" CustomerID and seed it into the control on your subform.

Please give me an example of how you would do this.
 
This is what I tried on the OnClick of the cmdButton:
'Me!frmPartsSelectionSub.Form!CustomerID.Value = Me.txtCustomerIDMain.Text
 

Users who are viewing this thread

Back
Top Bottom