Simple Question - Refreshing an Unbound Text Box

UNC_Access

Registered User.
Local time
Today, 15:04
Joined
Oct 24, 2012
Messages
42
Hi!

Here is the situation (simplified):

1. I have a table called table_1

2. table_1 contains field_A, field_B, and field_C

3. I have form called frm_1

4. frm_1 contains text boxes to update field_A, field_B, and field_C from table_1

5. frm_1 also contains an unbound text box which calculates: field_A+field_B+field_C

Question:

How can I get the unbound text box to refresh automatically after any field is updated (A, B, or C)?

Thanks in advance!
 
it should do it automatically - the controlsource should be

=[field_A]+[field_B]+[field_C]

This assumes that these 3 fields are numeric
 
You'll need to account for Null fields, or you'll only get a total if and when all three fields are populated:

=Nz([field_A])+Nz([field_B])+Nz([field_C])

Linq ;0)>
 
Last edited:
Thanks for the replies! However, I am still having trouble.

- I do have NZ used in the calculation as you have described, but the unbound text box still isn't auto-refreshing

- Yes, all three fields are numeric (and the expression is in the Control Source section of the text box's properties)

For example, say I open the form and it looks like this:

field_A: $1
field_B: $2
field_C: $3
unbound text box: $6

If I immediately tab to field_B and type $5 and hit enter, it will look like this:

field_A: $1
field_B: $5
field_C: $3
unbound text box: $6 (unchanged)

The same applies for any of the three fields.

Any thoughts?
 

Users who are viewing this thread

Back
Top Bottom