cascade dates

G

Guest

I have created two tables one for job orders and one for drawings. with a one
to many relationship. one job order to many drawings. I have a field called
Auth_date in the job order table, and in the drawing table a field for how
long a drawing takes to develop (INTV) and a date field for the auth_date
plus intv(dwg_complete). Next I created a form in which the job order table
supports the primary form and the drawing table supports the subform. What I
am trying to do is when I fill in an authorized date in the job order table
have it automaticly caculate the the date for dwg_complete for all related
records. All of my attempts will only update one record, the other records
will not update until I select each one. how do i get all of them to update
at once?
 
J

John Vinson

I have created two tables one for job orders and one for drawings. with a one
to many relationship. one job order to many drawings. I have a field called
Auth_date in the job order table, and in the drawing table a field for how
long a drawing takes to develop (INTV) and a date field for the auth_date
plus intv(dwg_complete). Next I created a form in which the job order table
supports the primary form and the drawing table supports the subform. What I
am trying to do is when I fill in an authorized date in the job order table
have it automaticly caculate the the date for dwg_complete for all related
records. All of my attempts will only update one record, the other records
will not update until I select each one. how do i get all of them to update
at once?

Do you really want to store this information? Since the dwg_complete
field can (in principle) be calculated from the Auth_date and INTV
fields, it's at least formally redundant! Do you want to be able to
override this field?

How are you doing the calculation? If it's on the Form, then yes, it
will be just the active record; so don't *do* that - use an Update
query instead, or base the subform on a Query using a calculated
field.

John W. Vinson[MVP]
 
G

Guest

I am using the add date formula to caculate the date, i want to keep the
caculated date in the table.
 
P

Pat Hartman\(MVP\)

Do you know why you want to keep the calculated date in the table? Doing so
is poor practice and can lead to data anomalies. If you never need to
override this date to allow individual drawings to have a different date
than the group, then the best solution is to always calculate the date in
your query. That way you are not storing redundant data, the user can't
change the date on individual records, and you don't need to worry about
data anomalies.
 

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