Code Question

ppoole16

Registered User.
Local time
Today, 22:54
Joined
Aug 21, 2003
Messages
57
I'm having trouble with what I know is a simple code. I have text controls: $1, $5, $10 etc in a form. The user is to input the quantity of each bill in possession. I then need the form to display the total dollar amount. What should I type in the Control Source property?

Example: He has two $1 and 3 $10 Total = $32.00.

I also need to know how to make the form recognize an empty text control as 0. What I mean by this is that in my current code, the user is required to type 0 in an empty box in order to make a calculation.

Thanks for the help.
 
ppoole16 said:
I'm having trouble with what I know is a simple code. I have text controls: $1, $5, $10 etc in a form. The user is to input the quantity of each bill in possession. I then need the form to display the total dollar amount. What should I type in the Control Source property?


Use a control with a calculation as its recordsource:

=Nz([txt1]) + Nz([txt2]) + etc

I also need to know how to make the form recognize an empty text control as 0. What I mean by this is that in my current code, the user is required to type 0 in an empty box in order to make a calculation.

Lookup the Nz() function in help.
 

Users who are viewing this thread

Back
Top Bottom