I have a combo box with an After Update event that is meant to move to a new record and then set several other fields on the form to the value of secondary columns in the combo box. It moves to the new record correctly and sets the values of the first two fields, but then stops - it leaves all the other values NULL. Here is the code - can anyone tell me what is wrong?
[tt]
Private Sub cbAddJob_AfterUpdate()
On Error GoTo Err_cbAddJob_AfterUpdate
DoCmd.GoToRecord , , acNewRec
Me!fjobno.Value = Me!cbAddJob.Column(0)
Me!fcompany.Value = Me!cbAddJob.Column(1)
Me!fquantity.Value = Me!cbAddJob.Column(2)
Me!fmeasure.Value = Me!cbAddJob.Column(3)
Me!fpartno.Value = Me!cbAddJob.Column(4)
Me!fcudrev.Value = Me!cbAddJob.Column(5)
Me!fdescript.Value = Me!cbAddJob.Column(6)
Exit_cbAddJob_AfterUpdate:
Exit Sub
Err_cbAddJob_AfterUpdate:
MsgBox Err.Description
Resume Exit_cbAddJob_AfterUpdate
End Sub
[/tt]
Cheryl dc Kern
[tt]
Private Sub cbAddJob_AfterUpdate()
On Error GoTo Err_cbAddJob_AfterUpdate
DoCmd.GoToRecord , , acNewRec
Me!fjobno.Value = Me!cbAddJob.Column(0)
Me!fcompany.Value = Me!cbAddJob.Column(1)
Me!fquantity.Value = Me!cbAddJob.Column(2)
Me!fmeasure.Value = Me!cbAddJob.Column(3)
Me!fpartno.Value = Me!cbAddJob.Column(4)
Me!fcudrev.Value = Me!cbAddJob.Column(5)
Me!fdescript.Value = Me!cbAddJob.Column(6)
Exit_cbAddJob_AfterUpdate:
Exit Sub
Err_cbAddJob_AfterUpdate:
MsgBox Err.Description
Resume Exit_cbAddJob_AfterUpdate
End Sub
[/tt]
Cheryl dc Kern