I'm not quite ready to give up on this yet... Using MS Access 2003, WinXP SP2.
I have a listbox that I'm trying to get to highlight (select) a specific record using the GotFocus event (the listbox setfocus is passed by a combobox afterupdate event).
The code I have is:
[CODE=vb]
Private Sub lstRate_GotFocu s()
Dim rs As DAO.Recordset
Dim SelDate As Date
'Dim MyVarBM As Long
SelDate = DMax("[DateChange]", "tblDate")
Set rs = Me.lstRate.Reco rdset
With rs
.MoveLast
.FindFirst "[DateChange] = #" & SelDate & "#"
If .NoMatch Then
MsgBox "No Match Found"
End If
End With
End Sub[/CODE]
The code executes fine, the list box recieves the focus, .nomatch is set to false, the variables populate as desired... However the desired record is not highlighted in the listbox!
Anyone able to help me here??
Thanks in advance!
Regards,
Scott
I have a listbox that I'm trying to get to highlight (select) a specific record using the GotFocus event (the listbox setfocus is passed by a combobox afterupdate event).
The code I have is:
[CODE=vb]
Private Sub lstRate_GotFocu s()
Dim rs As DAO.Recordset
Dim SelDate As Date
'Dim MyVarBM As Long
SelDate = DMax("[DateChange]", "tblDate")
Set rs = Me.lstRate.Reco rdset
With rs
.MoveLast
.FindFirst "[DateChange] = #" & SelDate & "#"
If .NoMatch Then
MsgBox "No Match Found"
End If
End With
End Sub[/CODE]
The code executes fine, the list box recieves the focus, .nomatch is set to false, the variables populate as desired... However the desired record is not highlighted in the listbox!
Anyone able to help me here??
Thanks in advance!
Regards,
Scott
Comment