Error catching #error

  • Thread starter Thread starter NewAccessUser
  • Start date Start date
N

NewAccessUser

When I put "Round(30.3+20.8*1/Tan(0.29+0.15*([CClay]/10)),0)" in a form and
query, I am getting "#error" because [CClay] is empty. What is the VB code
to trap #error and let me go to the next input box. Thanks in advance for
any help.
 
You can use the IIf function to test if there is a value in [CClay] and only
perform the calculation if there is one:

IIf([CClay] is Null, Null,
Round(30.3+20.8*1/Tan(0.29+0.15*([CClay]/10)),0) )
 
Back
Top