code for focus on a text input field

action

Registered User.
Local time
Tomorrow, 00:51
Joined
May 29, 2003
Messages
89
I am slowly learning VBA via this board and asking basic questions

Here's one:

I have a text input box that is reset via a command button using the following code:

Private Sub CmdReset_Click()
With Me.lstResults
.RowSource = strSource
.Requery
End With
End Sub


What can I add to the code to move the focus back to the text input box called txtfilter?

Thanks
 
Code:
Private Sub CmdReset_Click() 
    With Me.lstResults 
        .RowSource = strSource 
        .Requery 
    End With
    [b]Me.txtFilter.SetFocus[/b]
End Sub
 
Thanks Mile-O-Phile
 

Users who are viewing this thread

Back
Top Bottom