I have an ubound object I use to Incrementally search as I enter data.
The code I use is shown below. As I type in a number the cursor jumps back to the beginning of the field.
Anybody have an idea what could cause this strange behavior?
Private Sub PcoNoSearch_Change()
Dim PcoSearchFilter As String, PcoSearchTxtVal As Double
If Not IsNull(Me![PcoNoSearch].Text) And Me![PcoNoSearch].Text <> "*.*" Then
PcoSearchFilter = "[ChngPropNo] like " & """" & "*" & Me![PcoNoSearch].Text & "*" & """" & " And " & "[ContractId] = " & """" & Me![CurCntrId] & """"
Else
PcoSearchFilter = ""
End If
Forms![0_masterdatafrm]![01_WkgChngProposalSimpleFrm].Form.Filter = PcoSearchFilter
Forms![0_masterdatafrm]![01_WkgChngProposalSimpleFrm].Form.FilterOn = -1
End Sub
Private Sub PcoNoSearch_Change()
Dim PcoSearchFilter As String, PcoSearchTxtVal As Double, str
str = str & Me.[PcoNoSearch].Text
' If Not IsNull(Me![PcoNoSearch].Te
' PcoSearchFilter = "[ChngPropNo] like " & """" & "*" & Me![PcoNoSearch].Text & "*" & """" & " And " & "[ContractId] = " & """" & Me![CurCntrId] & """"
' Else
' PcoSearchFilter = ""
' End If
PcoSearchFilter = "[ChngPropNo] Like '*" & str & "*' And [ContractId] = " & Me.[CurCntrId]
'if [ContractId] is Text Data, use below
' PcoSearchFilter = "[ChngPropNo] Like '*" & str & "*' And [ContractId] = '" & Me.[CurCntrId] & "'"
Forms![0_masterdatafrm]![0
Forms![0_masterdatafrm]![0
End Sub