Hi there,
Been struggling with this simple thing for days now...
If I move through a listbox by using the keyboard (NOT the mouse) to display the seletced record in a 'detailed' form I get the previous record that was selected in the listbox displayed in the detailed form instead of the newly selected record in the list box...
Here's the code:
Private Sub lstBook_AfterUpdate()
Dim varBkFilt As String
varBkFilt = "[BookID] = " & Me.lstBook.Column(0)
If IsLoaded("BookDetails") Then
Forms!BookDetails.Filter = varBkFilt
MsgBox varBkFilt
Forms!BookDetails.FilterOn = True
End If
End Sub
If I 'click' on the listbox the record displays fine but not if I navigate via the keyboard. Im using Access 2007.
Can anyone help?
Thanks in advance
dazza61
Been struggling with this simple thing for days now...
If I move through a listbox by using the keyboard (NOT the mouse) to display the seletced record in a 'detailed' form I get the previous record that was selected in the listbox displayed in the detailed form instead of the newly selected record in the list box...
Here's the code:
Private Sub lstBook_AfterUpdate()
Dim varBkFilt As String
varBkFilt = "[BookID] = " & Me.lstBook.Column(0)
If IsLoaded("BookDetails") Then
Forms!BookDetails.Filter = varBkFilt
MsgBox varBkFilt
Forms!BookDetails.FilterOn = True
End If
End Sub
If I 'click' on the listbox the record displays fine but not if I navigate via the keyboard. Im using Access 2007.
Can anyone help?
Thanks in advance
dazza61