"William Bradley" <br******@magma.ca> wrote in message
news:zf********************@magma.ca...
I have two cells on a form. One of them is the "Production Date" and the
other is the "Expiry Date". The "Expiry Date" is 183 days after the
"Production Date."
On an Excel spreadsheet, the "Expiry Date" is automatically entered, when
the "Production Date" is entered. To do this the "Expiry Date" cell carries
the following formula: "=A15+183".
I would like to be able to do the same on an Access Form, with the results
written to the underlying table.
This all made perfect sense until the last sentence. Why do you want to store this
value rather than calculate it on the fly? That is what Excel is doing. Why not
have Access do the same? Storing this in the table would make as much sense as
writing a macro in Excel that would Add 183 to the values found in column A and
writing the result to column B. Then every time you change something in column A you
would re-run the macro to make sure that column B is correct. Sounds silly when you
can just enter an expression in column B to do all of this for you automatically
doesn't it?
Just use a control on the form with an expression as its ControlSource that will do
the calculation and display the result. Saving it to the table accomplishes nothing
useful.