2 fields, 2 tables, one update

  • Thread starter Thread starter laura
  • Start date Start date
L

laura

I have two tables that have similar fields (one table - adjnotes - has claim
total expenses paid field; the other table - litigation - has expenses paid).
If I update the claim total expenses paid field in the adjnotes table, I
want this data to push into the expenses paid field on the litigation table
and vice versa. Any pointers? This is a really complex database which I did
not create and I am a novice.

Thanks!
 
Your database has a basic problem; maybe two. A data element, in your case
expenses, should only be stored in one field in one table. You need to look
at the design of the tables in your database and eliminate one of the expene
fields. Further, from your post, if you are storing both expense items and
total expenses, that is also incorrect. Total expenses should be calculated
on-the-fly from the individual expense items where needed.

Steve
(e-mail address removed)
 
Question: Can two fields be updated in two tables at the same time? Yes
Question: Is it easy? No

It can be done, and there are many ways. The most straight forward way I
can think of would be code behind the form used to add the information.

The simplest, most straight forward way I could think of:

1) Add a button to the form.
2) Place code behind the button to add the values of that form to the
'other' table.

It's really hard to say what 'exactly' to do because there are so many
unknown variables. Things like 'Primary Keys' 'Foreign Keys' 'How do the
tables relate, or do they relate?' And probably only the creator of that
database knows the answers (and with lack of exposure, even that person may
not know any more.) It could take lots of research into the database tool
and tables to know.
 
Back
Top