Hello:
I would like to use information on one form to populate another form. There are 2 controls I would like to transfer; a list box control and a text box control. both are unbound controls in the subform footer of the form F_MixDesign.
Form1: F_MixDesign
Subform1: SF_MixSample
Control name: txtWaterReqWt
Form2:FSampleRe quest
Subform2: SF_SampleReques t
Control name: txtWater
Both the control I would like to copy and the control that will be copied to are in the subform footers.
I have a button on form1 that when clicked will open form2. Here is my code, but I know it's wrong because it doesn't work.
Private Sub btnOpenSampReq_ Click()
DoCmd.OpenForm "F_SampleReques t"
'Open F_Sample Request
Forms!F_SampleR equest.Controls !txtWater = Forms!F_MixDesi gn.Controls!Lis tWater
Forms!F_SampleR equest.Controls !txtWatReqWt = Forms!F_MixDesi gn.Controls!txt WaterReqWt
End Sub
I have also tried using:
Me!SF_SampleReq uest.Controls!t xtWater = Me!SF_MixDesign .Controls!ListW ater
I would like to use information on one form to populate another form. There are 2 controls I would like to transfer; a list box control and a text box control. both are unbound controls in the subform footer of the form F_MixDesign.
Form1: F_MixDesign
Subform1: SF_MixSample
Control name: txtWaterReqWt
Form2:FSampleRe quest
Subform2: SF_SampleReques t
Control name: txtWater
Both the control I would like to copy and the control that will be copied to are in the subform footers.
I have a button on form1 that when clicked will open form2. Here is my code, but I know it's wrong because it doesn't work.
Private Sub btnOpenSampReq_ Click()
DoCmd.OpenForm "F_SampleReques t"
'Open F_Sample Request
Forms!F_SampleR equest.Controls !txtWater = Forms!F_MixDesi gn.Controls!Lis tWater
Forms!F_SampleR equest.Controls !txtWatReqWt = Forms!F_MixDesi gn.Controls!txt WaterReqWt
End Sub
I have also tried using:
Me!SF_SampleReq uest.Controls!t xtWater = Me!SF_MixDesign .Controls!ListW ater
Comment