Using 'After Update' on Combo Box

nocolo

New member
Local time
Today, 05:16
Joined
Apr 1, 2002
Messages
5
I have a form with a combo box and several text boxes on it. What I would like to happen is that when I update the combo box with a new record, the corresponding text boxes update to show the new record. I am doing that right now on another form in the same datebase. Unfortunately when I try to do the same thing on this new form it will only work once. The code I am using is as follows:
Private Sub Combo26_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindNext "[AssetNo] = " & Str(Me![Combo26])
Me.Bookmark = rs.Bookmark
End Sub
Other than different object names the same code works all the time on one form and only once on the new form.
If I update the combobox and then press
'Shift'+ 'F9' it will update the text boxes.
The text boxes have a control source of the column names that fill the combobox. The combo box does not have a control Source, only a querry in the record source.
Can anyone give me any suggestions on this, they would be greatly appreciated.

Chris
 
On AfterUpdate of the combobox do a Me.Requery, assuming your on a bound form.
 

Users who are viewing this thread

Back
Top Bottom