Hi
I have a search box within a form that searches multiple fields, I have set it up to search when the search button is clicked. But I would also like it to search when the user presses enter. I have been trying to add code but it isn't working and hope to get some help please.
I have added the following with in the KeyDown event:
Private Sub txtsearch_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Me.Refresh
but_Enter_Click
KeyCode = 0
End If
End Sub
I don't think it is liking the but_Enter_Click.
I'm a beginner when it comes to code so any help or advice would be great.
thanks
Alistair