Removing #Error code...

rap1971

Registered User.
Local time
Today, 17:30
Joined
Jan 16, 2001
Messages
23
I found a wonderful little piece of code to remove that nasty #Error in calculated text boxes...but I don't know where to put it to make it work.

I tried putting it in the default property...it's a function call

Function removeerror(testvalue As Variant) as Variant

If Not(IsNumeric(testvalue)) Then
removeerror=0
Else
removeerror=testvalue
End If

End Function

I have the Default property set to
=removeerror([txtbox])

Grrrrrrr.
I know when I dish this out to my staff and they see that #Error code they are going to freak...
 
The text box is a calculated field, dependent upon the values of other objects on the form (listboxes and comboboxes, etc.) Until all of the necessary boxes are filled with values, the calculation doesn't execute, therefore leaving me with #Error appearing in that box. End users don't like such things...I'd get a million phone calls..."It doesn't work! I'm getting errors!"
 

Users who are viewing this thread

Back
Top Bottom