Value fields in forms diferent same fields in tables 
Author Message
 Value fields in forms diferent same fields in tables

Hi everone
My problem is that i have a field in a table called total price and
the same field on a form multiplies 2 other fields from the same
table. I can see the result on the form but in the table is in zeros.
Am i forgetting anything? Sure i am. What' Can anyone help me?
Tks in advance
Pedro


Sun, 17 Apr 2005 01:13:11 GMT  
 Value fields in forms diferent same fields in tables

Quote:
> Hi everone
> My problem is that i have a field in a table called total price and
> the same field on a form multiplies 2 other fields from the same
> table. I can see the result on the form but in the table is in zeros.
> Am i forgetting anything? Sure i am. What' Can anyone help me?
> Tks in advance
> Pedro

You're operating under a few misconceptions.

A control on a form can either be bound to a field in the underlying table
or contain an expression.  It cannot do both at the same time.  The fact
that the control on your form has the same *name* as the field in the
underlying table is irrelevent.  It does not store anything into that field
because you have entered an expression as its ControlSource which multiples
the other two fields together.

It is a violation of proper database design to store a value in that can be
easily derived from other data.  You have a perfectly good expression that
gives you the total on your form.  You can use that same expression in any
other situation where you need it.  Therefore the correct thing to do is
delete the total field from your table and forget about storing it
altogether.



Sun, 17 Apr 2005 01:26:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Auto copy from Form field to diferent SubForm field

2. set default value of field to value in a field in another table

3. Entering field values based on another field's values from the same table

4. Copy field into diferent field, next record

5. Two Tables, Same Key Field, Same Record, Except One Field in Both Tables Different Value

6. Transfer Value from Form Field to Form Field

7. value in forms not equal value in table fields

8. Set Default Value of Text Box in Form to be Max Value of Table Field + 1

9. Creating a default field value in a form based on the highest value in a table

10. Help debugging form event proc.: updating field in table using value from form


 
Powered by phpBB® Forum Software © phpBB Group