The following snippet of code works fine, except after execution the cursor positions at the beginning of the textbox instead of where the user left off. What I want is for the user to be able to keep entering the name in case the name that the database finds isn't the one they want.
Private Sub txtLName_Change()
Dim strName As String
Dim strField As String
Dim rs As ADODB.Recordset
strField = "LName"
strName = txtLName.Text
Set rs = GetArtist(strName, strField)
If Not rs.EOF Then
With rs
.MoveFirst
txtLName.Text = !LName
txtFName.Text = !FName
txtArtistID.Text = !artistID
End With
End If
Set rs = Nothing
End Sub
How do I tell VB not to resposition the cursor? Thanks
Private Sub txtLName_Change()
Dim strName As String
Dim strField As String
Dim rs As ADODB.Recordset
strField = "LName"
strName = txtLName.Text
Set rs = GetArtist(strName, strField)
If Not rs.EOF Then
With rs
.MoveFirst
txtLName.Text = !LName
txtFName.Text = !FName
txtArtistID.Text = !artistID
End With
End If
Set rs = Nothing
End Sub
How do I tell VB not to resposition the cursor? Thanks