G
Guest
I posted about a week ago and had some usefull feedback from J Goddard, but
ultimately it didn't resolve my problem, so here it is again;
My problem is the cursor remains in the field Text34, at the start of the
entered text, after the following code runs, I want it to leave and go to the
next field, or at worst go to the end of the text in Text34;
Private Sub Text34_AfterUpdate()
Dim stractiv As String
If strPtFilt = "" Then strPtFilt = "PtTbl.PtNum LIKE '*'"
If Not IsNull(Me![Text34]) Then
strDesc = Me![Text34]
Else: strDesc = "*"
End If
If Not IsNull(Me![Text39]) Then
Me.Filter = strPtFilt & " AND " & "PtTbl.PtDesc LIKE '*' & '" &
strDesc & "' & '*' AND PtTbl.PtDesc LIKE '*' & '" & strDesc2 & "' & '*'"
Else: Me.Filter = strPtFilt & " AND " & "PtTbl.PtDesc LIKE '*' & '" &
strDesc & "' & '*'"
End If
Me.FilterOn = True
End Sub
I have tried Me![Text34].SelStart = Len(Me![Text34]) and other options to
acheive the desired result, all to no avail.
Any other ideas?
TonyT..
ultimately it didn't resolve my problem, so here it is again;
My problem is the cursor remains in the field Text34, at the start of the
entered text, after the following code runs, I want it to leave and go to the
next field, or at worst go to the end of the text in Text34;
Private Sub Text34_AfterUpdate()
Dim stractiv As String
If strPtFilt = "" Then strPtFilt = "PtTbl.PtNum LIKE '*'"
If Not IsNull(Me![Text34]) Then
strDesc = Me![Text34]
Else: strDesc = "*"
End If
If Not IsNull(Me![Text39]) Then
Me.Filter = strPtFilt & " AND " & "PtTbl.PtDesc LIKE '*' & '" &
strDesc & "' & '*' AND PtTbl.PtDesc LIKE '*' & '" & strDesc2 & "' & '*'"
Else: Me.Filter = strPtFilt & " AND " & "PtTbl.PtDesc LIKE '*' & '" &
strDesc & "' & '*'"
End If
Me.FilterOn = True
End Sub
I have tried Me![Text34].SelStart = Len(Me![Text34]) and other options to
acheive the desired result, all to no avail.
Any other ideas?
TonyT..