I have a Search form where users can go and perform queries(single or multiple). They click the Search button to view the result.
Between the eight different fields they can search on, the first field(Log no.) is the most used one. I'm trying to make it easier for them, by allowing them to enter the Log number and hit the Enter key to perform the Search, instead of reaching for the mouse and clicking the search button, since this search is heavily used.
I tried the following method(among others), but I'm not having any luck.
(this is on the KeyPress event of the Log number text field on the search form)
Private Sub txtFilterLogNum_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then 'ascii no for Enter key
Call SearchLogNo_Click 'the function that executes when the search button is clicked
End If
End Sub
Would anybody have any idea how to go about this ???
I Would really appreciate it.
Many Thanks,
Elias
Between the eight different fields they can search on, the first field(Log no.) is the most used one. I'm trying to make it easier for them, by allowing them to enter the Log number and hit the Enter key to perform the Search, instead of reaching for the mouse and clicking the search button, since this search is heavily used.
I tried the following method(among others), but I'm not having any luck.
(this is on the KeyPress event of the Log number text field on the search form)
Private Sub txtFilterLogNum_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then 'ascii no for Enter key
Call SearchLogNo_Click 'the function that executes when the search button is clicked
End If
End Sub
Would anybody have any idea how to go about this ???
I Would really appreciate it.
Many Thanks,
Elias