help please
I have a simple bit of code
that searches for a [User Name] field
the basic idea is I place a field called "search" on a form
and set its on change to
Private Sub Search_Change()
Search.SetFocus
strtarget = Search.Text
If strtarget < "a" Then strtarget = "a"
[User Name].SetFocus
DoCmd.FindRecord strtarget, acStart, False, acSearchAll, False, acCurrent, True
Search.SetFocus
Search.SelStart = 100
End Sub
it takes the text entered in the search field and calls it Strtarget
then resets focus on the field I want eg [user name]
once the search has done it resets the focus on the search field so you can carry on typing
this works very well unless the search string starts with a letter I
and I have no idea why this is happening
can anyone help ??
I have a simple bit of code
that searches for a [User Name] field
the basic idea is I place a field called "search" on a form
and set its on change to
Private Sub Search_Change()
Search.SetFocus
strtarget = Search.Text
If strtarget < "a" Then strtarget = "a"
[User Name].SetFocus
DoCmd.FindRecord strtarget, acStart, False, acSearchAll, False, acCurrent, True
Search.SetFocus
Search.SelStart = 100
End Sub
it takes the text entered in the search field and calls it Strtarget
then resets focus on the field I want eg [user name]
once the search has done it resets the focus on the search field so you can carry on typing
this works very well unless the search string starts with a letter I
and I have no idea why this is happening
can anyone help ??