Null #error

K

kennykee

=[ProductCode] & " " & Trim([SkinDoorReplace] & " " & [Particular] & " " &
Left([Measurements],InStr([Measurements],"X")-2) & "mm X " &
Mid([Measurements],InStr([Measurements],"X")+2) & "mm")

If measurements is null , the above equation is #error
How to make it not #error when measurements is null?

Any solutions?

Thanks in advance

Kennykee
 
A

Alex White MCDBA MCSE

use the iif statement

bit of air code

iif(isnull(Measurements),0,Measurement)

but it would be better in the long run to make sure that the measurement
field never has null default the value to 0, would make your coding simpler.
 
K

Klatuu

Or
Nz(Measurements,0)

Alex White MCDBA MCSE said:
use the iif statement

bit of air code

iif(isnull(Measurements),0,Measurement)

but it would be better in the long run to make sure that the measurement
field never has null default the value to 0, would make your coding simpler.

--
Regards

Alex White MCDBA MCSE
http://www.intralan.co.uk

kennykee said:
=[ProductCode] & " " & Trim([SkinDoorReplace] & " " & [Particular] & " " &
Left([Measurements],InStr([Measurements],"X")-2) & "mm X " &
Mid([Measurements],InStr([Measurements],"X")+2) & "mm")

If measurements is null , the above equation is #error
How to make it not #error when measurements is null?

Any solutions?

Thanks in advance

Kennykee
 
Top