Blueice13085
asked on
Ms Access VB using if
i am using the if statement If (StartOdo <= 0) Then. what i need it to check is if StartOdo <=0 or StartOdo is blank, need it to check in one if don't want to use else if etc.
ASKER
code reads
but if StartOdo is blank then it goes to a different statement in my code (no listed here)
so i need it to check it here if StartOdo is blank, less then 0, or = to 0. If StartOdo is blank do above code, StartOdo is is less then 0 or = to 0 do above code.
If (StartOdo <= 0) Then
DoCmd.SetWarnings False
erg = MsgBox("No Start miles had been set for" & " " & Me.VehicleNumber.Column(0) & "," & " " & Me.OdoAtFillDate & " Miles " & "will be the Start Miles for this Vehicle. No other Data is Needed", vbOKOnly)
DoCmd.RunSQL (SQL2)
DoCmd.RunCommand (acCmdDeleteRecord)
DoCmd.Close
DoCmd.SetWarnings True
but if StartOdo is blank then it goes to a different statement in my code (no listed here)
so i need it to check it here if StartOdo is blank, less then 0, or = to 0. If StartOdo is blank do above code, StartOdo is is less then 0 or = to 0 do above code.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.