R
Ryan
I am using a list box on a form that gets updated with data from a pop-up
form that I created. The information added to the list box is the primary
key for the data listed on the form. I can add the data to the list box, but
when I highlight the newly added number the fields on the form display the
data for the first record in the table. Is there VB code that can be added
to the AfterUpdate event procedure of the list box that would refresh the
table data? Below is what is currently in the AfterUpdate event procedure.
Private Sub List2_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[FrmNumber] = '" & Me![List2] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
form that I created. The information added to the list box is the primary
key for the data listed on the form. I can add the data to the list box, but
when I highlight the newly added number the fields on the form display the
data for the first record in the table. Is there VB code that can be added
to the AfterUpdate event procedure of the list box that would refresh the
table data? Below is what is currently in the AfterUpdate event procedure.
Private Sub List2_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[FrmNumber] = '" & Me![List2] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub