Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eliminating #Error & #Num! Messages 1

Status
Not open for further replies.

Xtremlylost

Technical User
Jul 18, 2002
25
0
0
US
I have a form with several calculated fields. Until information is entered around them they display these errors. I simply want these sweet little notes to hide until valid numbers are entered into the various fields of the form.
Any idea how?

Sometimes the view is perfect right where you are and sometimes falling is the only way to know it.
 
Can you play with the Iif function in the calculated fields ?

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Perhaps. I was hoping for something simple like code that would check the calc field first for a valid number and if there wasn't one then simply show a null value, zero,or perhaps my own message.

Do you have something in mind?

Sometimes the view is perfect right where you are and sometimes falling is the only way to know it.
 
What I have in mind is to use 'safe' formulas for calculated field, using some functions like Iif, IsNumeric, IsEmpty, IsNull, ...

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
I will do some research in help on these. I have not used any of these functions before and wasn't sure where to start. The person I am creating this for has mentioned distributing it to other plants so I was wanting to make it look a little more professional than the typical toolbox approach I typically use. Usually don't have the time to dress things up. Function before form type of thing.
I appreciate your taking the time to help out.

Sometimes the view is perfect right where you are and sometimes falling is the only way to know it.
 

If IS NULL(Me!baseCtlname) then
Me!calculatedCtlname.visible = False
Else
Me!calculatedCtlname.visible = True
End If

Set this in the on current event. On the base controls set an after event procedure of:

Me.Refresh

so that the calulated control is displayed.

Cheers
 
Perfect. Works great. Just what I was looking for. Gave you a star for that one!

Thanks for the help.

Sometimes the view is perfect right where you are and sometimes falling is the only way to know it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top