V
Veus
Hi,
I have this bit of code:
Dim myText As Variant, i As Long
If Not IsNull(Me.mktAreaCombo) Or Me.mktAreaCombo = "" Then
If InStr(Me.mktAreaCombo, "...") > 0 Then
MsgBox "... Detected!"
myText = Split(Me.mktAreaCombo, "...")
For i = LBound(myText) To UBound(myText)
MsgBox myText(i)
Next i
Else
strWhere = strWhere & "([mktArea] = " &
Me.Controls("mktAreaCombo") & ") AND "
MsgBox "No ..."
End If
Exit Sub
End If
Im trying to check if "..." exists in what the user has entered in the
control called Me.mktAreaCombo
Even when i MsgBox out the control value it equals "1...2" (my
testing) however the InStr function always returns 0.
If i replace InStr(Me.mktAreaCombo, "...") with InStr("1...2", "...")
it works fine, however not when its reading it from a variable which
also equals "1...2"?
Am i missing something obvious?
Thanks
I have this bit of code:
Dim myText As Variant, i As Long
If Not IsNull(Me.mktAreaCombo) Or Me.mktAreaCombo = "" Then
If InStr(Me.mktAreaCombo, "...") > 0 Then
MsgBox "... Detected!"
myText = Split(Me.mktAreaCombo, "...")
For i = LBound(myText) To UBound(myText)
MsgBox myText(i)
Next i
Else
strWhere = strWhere & "([mktArea] = " &
Me.Controls("mktAreaCombo") & ") AND "
MsgBox "No ..."
End If
Exit Sub
End If
Im trying to check if "..." exists in what the user has entered in the
control called Me.mktAreaCombo
Even when i MsgBox out the control value it equals "1...2" (my
testing) however the InStr function always returns 0.
If i replace InStr(Me.mktAreaCombo, "...") with InStr("1...2", "...")
it works fine, however not when its reading it from a variable which
also equals "1...2"?
Am i missing something obvious?
Thanks