Refresh controls populated from combo

J

Justin83716

I have three controls (txtLast, txtFirst, txtMI) that are populated by a
combo box (cboEmployeeNumber) however when I advance to the next record the
three populated controls continue to display the last records data even
though the combo box is now blank. Any ideas how I can get these fields to
return to an unpopulated status like the combo box?

I'm not sure if this is code related or not, but here is my current code;

Private Sub EmpNumber_AfterUpdate()
Me!Last = Me!EmpNumber.Column(1)
Me!First = Me!EmpNumber.Column(2)
Me!MI = Me!EmpNumber.Column(3)
End Sub

Thanks
 
M

Marshall Barton

Justin83716 said:
I have three controls (txtLast, txtFirst, txtMI) that are populated by a
combo box (cboEmployeeNumber) however when I advance to the next record the
three populated controls continue to display the last records data even
though the combo box is now blank. Any ideas how I can get these fields to
return to an unpopulated status like the combo box?

I'm not sure if this is code related or not, but here is my current code;

Private Sub EmpNumber_AfterUpdate()
Me!Last = Me!EmpNumber.Column(1)
Me!First = Me!EmpNumber.Column(2)
Me!MI = Me!EmpNumber.Column(3)
End Sub


You need the same code in the form's Current event.

OTOH, you don't really need any code at all. Just the three
text boxes expression to:
=EmpNumber.Column(1)
 
J

Justin83716

Great! That did it. Thanks!

Marshall Barton said:
You need the same code in the form's Current event.

OTOH, you don't really need any code at all. Just the three
text boxes expression to:
=EmpNumber.Column(1)
 
Top