joeythelips
IS-IT--Management
Hi,
i need to check whether a value in a filed called multiplier is divisible by 10 ie there should be no decimal points after the division. Basically, i am looking for numbers like 10, 20, 30, 40 etc.
I already have a check on this field to make sure its value is numeric. (see code below)
Sometimes the multiplier will be 1. Obviously 1 divided by ten does not give you a whole number, but i want this to be accepted.
Could someone help me with the code please.
'quality check:checking for blank multiplier
strsql = "SELECT count(*), min([MPRN]) from startupbills WHERE Isnumeric([Multiplier])=False"
Set rs2 = CurrentDb.OpenRecordset(strsql, dbOpenForwardOnly)
If rs2(0) > 0 Then
MsgBox "The file '" & startfilename & "' has " & rs2(0) & " Invalid [Multiplier] record(s). The first occurance is '" & rs2(1) & "'", vbExclamation
GoTo ExitHandler
End If
rs2.Close
Thanks in advance.
Joe
i need to check whether a value in a filed called multiplier is divisible by 10 ie there should be no decimal points after the division. Basically, i am looking for numbers like 10, 20, 30, 40 etc.
I already have a check on this field to make sure its value is numeric. (see code below)
Sometimes the multiplier will be 1. Obviously 1 divided by ten does not give you a whole number, but i want this to be accepted.
Could someone help me with the code please.
'quality check:checking for blank multiplier
strsql = "SELECT count(*), min([MPRN]) from startupbills WHERE Isnumeric([Multiplier])=False"
Set rs2 = CurrentDb.OpenRecordset(strsql, dbOpenForwardOnly)
If rs2(0) > 0 Then
MsgBox "The file '" & startfilename & "' has " & rs2(0) & " Invalid [Multiplier] record(s). The first occurance is '" & rs2(1) & "'", vbExclamation
GoTo ExitHandler
End If
rs2.Close
Thanks in advance.
Joe