Need help: How to hide #Error message from textbox until values are entered

JTQ911

Registered User.
Local time
Today, 11:31
Joined
Jul 26, 2007
Messages
83
Hello. I am having a bit of a problem. Some of my forms contain textboxes which perform calculations. For example, one textbox performs a calculations such as

= [Text10] + [Text20]

This textbox takes the values stored in Text10 and Text20 and sums them. However, I want to hide or remove the #Error message that is displayed in the calculation textbox until values are entered for both Text10 and Text20. Hoepfully this makes sense, I apologize for my newb-ness.

Jim
 
This should do it:

= Nz([Text10],0) + Nz([Text20],0)
 
Awesome, so I simply put Nz([TextXX],0) before every component used in the calculation. Is there any way to have even no 0 there, just blank space? Thanks for the help, especially so fast!
 
I just did Nz([TextXX], " ") which worked and displayed absolutely nothing when there were no values in any of the textboxes used in the calculation. However, when i placed one value in one textbox used in the calculation and nothing in the other textbox used in the calculation, i receieved another #Error message.
 
I just did Nz([TextXX], " ") which worked and displayed absolutely nothing when there were no values in any of the textboxes used in the calculation. However, when i placed one value in one textbox used in the calculation and nothing in the other textbox used in the calculation, i receieved another #Error message.

That's because of your "modification" to Bob's code! With your code, when one textbox has data, you're trying to add a number to an empty string, which you can't do! With Bob's code you'd be adding a number to zero, which you can do! There's absolutely no reason to replace the zero with an empty string! Go back to the code Bob gave you!
 
Last edited:
GOOD TO KNOW. Thanks everyone. Problem resolved:)
 

Users who are viewing this thread

Back
Top Bottom