bind a text box with an expression to a field in a table

D

darren

Hi,

I would like to know how to bind a text box (in a form) that contains an
expression in the control source, to a field in an underlying table? In
essence I want to display in a table the result claculated in the text box
(form).

I am using Access 2003.
 
F

fredg

Hi,

I would like to know how to bind a text box (in a form) that contains an
expression in the control source, to a field in an underlying table? In
essence I want to display in a table the result claculated in the text box
(form).

I am using Access 2003.

Why do you need to save the calculated value in any table? That goes
against the rules of database normalization.
Any time you need to see the results of the calculation ...
recalculate it. This way, if any of the values used in the
calculation have been changed, the total result will always be
correct.
 
D

darren

I understand this may not be the best way of going about this, and it
something I would not normally consider. Without providing all the details,
it is something I must do on this occasion. Is there a way to display in a
table the result claculated in the text box (form)?
 
B

Bob Quintal

I understand this may not be the best way of going about this, and
it something I would not normally consider. Without providing all
the details, it is something I must do on this occasion. Is there
a way to display in a table the result claculated in the text box
(form)?

You will need to remove the expression from the textbox, bind the
textbox to the field in the form, and calculate the expression in
Visual Basic code in an event procedure in the form or in one of the
form controls' event procedure. The final statement in the event
procedure would write the calculation to the textbox.

Q
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top