G
Guest
I searched this error before posting - couldn't seem to find a solution for
me.
I have two synchronized combo boxes - cboFirst which contains branch
locations and cboFind which contains customers assigned to those branches.
Works fine until I choose a customer name from cboFind - it still populates
but once I choose a customer and tab to the next field it gives me this
error.
cboFirst afterupdate code:
Private Sub cboFirst_AfterUpdate()
cboFind.Requery
cboFind.SetFocus
End Sub
cboFind afterupdate Code:
Private Sub cboFind_AfterUpdate()
Me.Painting = False
DoCmd.GoToRecord , , acFirst
Do Until Me!COMPANY_NAME = Me!cboFind
DoCmd.GoToRecord , , acNext
If Me.Recordset.EOF Then Exit Sub
Loop
Me.Painting = True
End Sub
I also have this to populate the customer number after the name is chosen -
not sure if this might be the cause but this is the code:
Private Sub cboFind_Exit(Cancel As Integer)
Me.CUSTOMER_NUMBER.Value = Me.cboFind.Column(1) ' value of Y
End Sub
Thank you for any help!
me.
I have two synchronized combo boxes - cboFirst which contains branch
locations and cboFind which contains customers assigned to those branches.
Works fine until I choose a customer name from cboFind - it still populates
but once I choose a customer and tab to the next field it gives me this
error.
cboFirst afterupdate code:
Private Sub cboFirst_AfterUpdate()
cboFind.Requery
cboFind.SetFocus
End Sub
cboFind afterupdate Code:
Private Sub cboFind_AfterUpdate()
Me.Painting = False
DoCmd.GoToRecord , , acFirst
Do Until Me!COMPANY_NAME = Me!cboFind
DoCmd.GoToRecord , , acNext
If Me.Recordset.EOF Then Exit Sub
Loop
Me.Painting = True
End Sub
I also have this to populate the customer number after the name is chosen -
not sure if this might be the cause but this is the code:
Private Sub cboFind_Exit(Cancel As Integer)
Me.CUSTOMER_NUMBER.Value = Me.cboFind.Column(1) ' value of Y
End Sub
Thank you for any help!