G
Guest
Hi,
I'm not sure how to go about this. I need to validate a textbox. Any value
can be in the textbox but if certain values are there they need to be the
first item in the box and 3 of them must be spelled correctly. The items:
"Major", "Major Tenant", & "Anchor" must be spelled correctly, but they can
have additional information after them.
Here's what I have so far:
i = InStr(frmStoreData.txtAddUnitNos, "Maj")
If i <> 1 Then
MsgBox ("Major must be the first item listed")
Good = False
End If
i = InStr(frmStoreData.txtAddUnitNos, "Anc")
If i <> 1 Then
MsgBox ("Anchor must be the first item listed")
Good = False
End If
i = InStr(frmStoreData.txtAddUnitNos, "Pad")
If i <> 1 Then
MsgBox ("Pad must be the first item listed")
Good = False
End If
i = InStr(frmStoreData.txtAddUnitNos, "Ret")
If i <> 1 Then
MsgBox ("Retail must be the first item listed")
Good = False
End If
How would I check the spelling for just that portion of the string?
I'm not sure how to go about this. I need to validate a textbox. Any value
can be in the textbox but if certain values are there they need to be the
first item in the box and 3 of them must be spelled correctly. The items:
"Major", "Major Tenant", & "Anchor" must be spelled correctly, but they can
have additional information after them.
Here's what I have so far:
i = InStr(frmStoreData.txtAddUnitNos, "Maj")
If i <> 1 Then
MsgBox ("Major must be the first item listed")
Good = False
End If
i = InStr(frmStoreData.txtAddUnitNos, "Anc")
If i <> 1 Then
MsgBox ("Anchor must be the first item listed")
Good = False
End If
i = InStr(frmStoreData.txtAddUnitNos, "Pad")
If i <> 1 Then
MsgBox ("Pad must be the first item listed")
Good = False
End If
i = InStr(frmStoreData.txtAddUnitNos, "Ret")
If i <> 1 Then
MsgBox ("Retail must be the first item listed")
Good = False
End If
How would I check the spelling for just that portion of the string?