G
Guest
I want to be able to enter data in a control on a subform when a selection is
made in a combo box on the subform. The code is in the After Update event of
this combo box on the subform and it refers to a combo box on the main form
in which a selection has already been made. The data I want is in the 4th
literal column in the SQL, but since it's zero based, I've put Column 3 in
the code. I have a similar process working on the subform for another control
that contains similar information. When I make a selection in the combo box
on the subform, I receive runtime error 450: Wrong number of arguments or
invalid property assignment. Can anyone help?
Here is the code for both. Is there something wrong with my syntax? (I've
included my comments in the code)
This is the code that generates an error
Private Sub cboExAction_AfterUpdate()
'Enters FIPS code for the primary state selected in cboState on the main
form into
'txtFIPS_1
txtFIPS_1 = Forms!frm_SR_Data_Entry!cboState.[Column](3)
End Sub
This code works fine. But of course the reference is to a control on the
same form.
Private Sub cboExPartnerState_AfterUpdate()
'Enters FIPS code for the partner state selected in cboPartnerState into
txtFIPS_2
txtFIPS_2 = Me!cboExPartnerState.[Column](1)
End Sub
made in a combo box on the subform. The code is in the After Update event of
this combo box on the subform and it refers to a combo box on the main form
in which a selection has already been made. The data I want is in the 4th
literal column in the SQL, but since it's zero based, I've put Column 3 in
the code. I have a similar process working on the subform for another control
that contains similar information. When I make a selection in the combo box
on the subform, I receive runtime error 450: Wrong number of arguments or
invalid property assignment. Can anyone help?
Here is the code for both. Is there something wrong with my syntax? (I've
included my comments in the code)
This is the code that generates an error
Private Sub cboExAction_AfterUpdate()
'Enters FIPS code for the primary state selected in cboState on the main
form into
'txtFIPS_1
txtFIPS_1 = Forms!frm_SR_Data_Entry!cboState.[Column](3)
End Sub
This code works fine. But of course the reference is to a control on the
same form.
Private Sub cboExPartnerState_AfterUpdate()
'Enters FIPS code for the partner state selected in cboPartnerState into
txtFIPS_2
txtFIPS_2 = Me!cboExPartnerState.[Column](1)
End Sub