control source problem.

P

Paul Watkins

Hi
I am fairly new to databases' and have a problem.
I Have a Form, on which i have text input boxes linked to a table.
One of the text boxes has this 'calculation' as the 'control source'. The
problem is that i need the result of that calculation to be linked to the
table.
all the other text boxes have 'control sources' linked to columns within the
table.


This is the expression i have as the control source. Can it be modified? so
that the result is linked to the column (result) in the table.

=[input]/7.2+[lost time]

Thanks in advance.


Paul
 
S

Steve Schapel

Paul,

In almost all cases, to comply with database design principles, the
correct answer to this question is that you shouldn't have a Result
field in the table at all, and it should be deleted. If date can be
derived from existing data, the derived value should not be stored
separately. Therefore, showing this value in an unbound textbox via a
calculation expression, as you have it at the moment, is the correct
approach. Any time you need this Result value for your purposes on form
or report, the same thing should be done, i.e. calculate it "on the
fly", either in the control source of the textbox on the form or report,
or within the query that the form or report is based on.
 
P

Paul Watkins

Thanks for the advice, i din't think of doing the calculation in the report.

Paul

Steve Schapel said:
Paul,

In almost all cases, to comply with database design principles, the
correct answer to this question is that you shouldn't have a Result
field in the table at all, and it should be deleted. If date can be
derived from existing data, the derived value should not be stored
separately. Therefore, showing this value in an unbound textbox via a
calculation expression, as you have it at the moment, is the correct
approach. Any time you need this Result value for your purposes on form
or report, the same thing should be done, i.e. calculate it "on the
fly", either in the control source of the textbox on the form or report,
or within the query that the form or report is based on.

--
Steve Schapel, Microsoft Access MVP


Paul said:
Hi
I am fairly new to databases' and have a problem.
I Have a Form, on which i have text input boxes linked to a table.
One of the text boxes has this 'calculation' as the 'control source'. The
problem is that i need the result of that calculation to be linked to the
table.
all the other text boxes have 'control sources' linked to columns within the
table.


This is the expression i have as the control source. Can it be modified? so
that the result is linked to the column (result) in the table.

=[input]/7.2+[lost time]

Thanks in advance.


Paul
 

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