#Error in form...

rap1971

Registered User.
Local time
Today, 17:34
Joined
Jan 16, 2001
Messages
23
I found a great piece of code to eliminate the #Error from displaying in calculated text boxes...(I have a text box that waits for the input of two others and then runs a calculation)

The problem is I don't know where to put it! I tried entering the function call into the Default property...didn't work

The code...which I set up in a module...is

Function removeerror(testvalue As Variant) As Variant

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

On the default line I tried entering =removeerror([txtcostfactor]) and when then didn't work I tried
=removeerror([txtcostfactor].Value)

Where else can I put this code?

Confused
 
The On Current property of the details section of a form
 

Users who are viewing this thread

Back
Top Bottom