Question : What wrong with this line of code?

What's wrong with this snippet of code? I'm trying to use the DoCmd. FindRecord and I'm trying to connect what's in the text box with the argument for the function.

What's wrong in this?
cmdSearch is the button.
txtSearch is the text box
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
Private Sub cmdSearch_Click()
 
txtSearch.SetFocus
 
DoCmd.FindRecord txtSearch, acEntire, False, acSearchAll, , acAll, True
 
End Sub
Open in New Window Select All

Answer : What wrong with this line of code?

Take a look at a short video demo I created.
This might be what you are looking for.

http://screencast.com/t/alGddcA6a

RGC
Random Solutions  
 
programming4us programming4us