delboy1295
Technical User
A Simple questiob for you wonderful techies!
I want to check the validity of certain codes viz:-
Dim OKCode, StkCode As String
StkCode = Mid(StockItemForm.StockItem.Code, 1, 4)
OKCode = "CLT/"
If InStr(OKCode, StkCode) = 0 Then
MsgBox StkCode, vbCritical
cancel = True
End If
End Sub
I want this to be ok only if 'CLT/' is entered, but the above accepts 'C' or 'L' etc.
Also I have some 30 of these to check - how do I string them together?
Thanks in anticipation!
Delboy
I want to check the validity of certain codes viz:-
Dim OKCode, StkCode As String
StkCode = Mid(StockItemForm.StockItem.Code, 1, 4)
OKCode = "CLT/"
If InStr(OKCode, StkCode) = 0 Then
MsgBox StkCode, vbCritical
cancel = True
End If
End Sub
I want this to be ok only if 'CLT/' is entered, but the above accepts 'C' or 'L' etc.
Also I have some 30 of these to check - how do I string them together?
Thanks in anticipation!
Delboy