B
Billp
I have a text feild that has a mask of >L00000, upper case, alpha with 5 digits
If the field is in the pattern >L00000 I have a sql statement to perform.
Or option 2 is to check if the last 5 characters are numeric then get it to
do the statement. So that if the field is an empty string or null nothing
happens.
I Have,
DoCmd.SetWarnings False
Dim strsql As String
'If Not IsNumeric(Left(Me!SER_Exists, 1)) Then
'If (Me!SER_Exists) = "" Then
If Me!SER_Exists Like ">L00000" Then 'fits the text pattern
strsql = " UPDATE tblSER " & _
" SET [QuoteNumberRef] = true " & _
" WHERE [SER_ID] = " & Me!cboSER_Exists.Column(1) 'Quotes
this way as field is numeric
'Debug.Print strsql
DoCmd.RunSQL strsql
Else
'do nothing
End If
DoCmd.SetWarnings True
But the form >L00000 doesn't look right
should it be "?#####"
Because ">L00000" doesn't do anything.
Thanks in advance
If the field is in the pattern >L00000 I have a sql statement to perform.
Or option 2 is to check if the last 5 characters are numeric then get it to
do the statement. So that if the field is an empty string or null nothing
happens.
I Have,
DoCmd.SetWarnings False
Dim strsql As String
'If Not IsNumeric(Left(Me!SER_Exists, 1)) Then
'If (Me!SER_Exists) = "" Then
If Me!SER_Exists Like ">L00000" Then 'fits the text pattern
strsql = " UPDATE tblSER " & _
" SET [QuoteNumberRef] = true " & _
" WHERE [SER_ID] = " & Me!cboSER_Exists.Column(1) 'Quotes
this way as field is numeric
'Debug.Print strsql
DoCmd.RunSQL strsql
Else
'do nothing
End If
DoCmd.SetWarnings True
But the form >L00000 doesn't look right
should it be "?#####"
Because ">L00000" doesn't do anything.
Thanks in advance