Calculating Fields In Form

M

Matt

The envisioned process is for a clerk to enter the PM Rcvd Date and when
he/she exits that field that a macro (mcrTarget) launches and calculates 7
target date fields.

The macro is an update query that has the 7 date fields listed and a
calculation for each (add x days to the PM Rcvd Date).

Currently, I set it up to run when I exit the PM Rcvd Date field but it does
not launch and display the dates. I then tried a command button and had the
same problem.

I also have a parameter set to enter an unique number (ECN Nbr] to launch a
particular record.

How else can I accomplish this? Thanks in advance for your help.
 
J

John W. Vinson

The envisioned process is for a clerk to enter the PM Rcvd Date and when
he/she exits that field that a macro (mcrTarget) launches and calculates 7
target date fields.

Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or just as you're now doing it -
in the control source of a Form or a Report textbox.

John W. Vinson [MVP]
 

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