Update table from another table

M

Mavis

Hi all,

I have 2 tables Currency_Rate and Claim. In both table there is ExchangeRate
field. How can i update the exchange rate in the Claim table when the claim's
status does not equal to Close after the user enter the exchange rate in the
Currency Rate table?
 
L

Larry Linson

Mavis said:
Hi all,

I have 2 tables Currency_Rate and Claim. In both table there is
ExchangeRate
field. How can i update the exchange rate in the Claim table when the
claim's
status does not equal to Close after the user enter the exchange rate in
the
Currency Rate table?

If the user is updating the Currency_Rate table from a Form, you can do this
in the Form's After Update event, either with code or a macro to execute an
Update Query. However, you have not given enough specific detail for a
specific answer: do you want to update every record for which the status is
not equal to close? If you allow the user to update the Currency_Rate table
directly, you cannot do what you want.

If so, why would you want to do repeated updates on all open Claims, rather
than just obtaining the then-current Exchange Rate to use (and save) at the
time you Close the Claim? It seems to me that would be simpler, would work
even if you allow the user to update the Currency_Rate table directly, and
would produce exactly the same result.

Larry Linson
Microsoft Office Access MVP
 
L

Larry Linson

Mavis said:
Hi all,

I have 2 tables Currency_Rate and Claim. In both table there is
ExchangeRate
field. How can i update the exchange rate in the Claim table when the
claim's
status does not equal to Close after the user enter the exchange rate in
the
Currency Rate table?

If the user is updating the Currency_Rate table from a Form, you can do this
in the Form's After Update event, either with code or a macro to execute an
Update Query. However, you have not given enough specific detail for a
specific answer: do you want to update every record for which the status is
not equal to close? If you allow the user to update the Currency_Rate table
directly, you cannot do what you want.

If so, why would you want to do repeated updates on all open Claims, rather
than just obtaining the then-current Exchange Rate to use (and save) at the
time you Close the Claim? It seems to me that would be simpler, would work
even if you allow the user to update the Currency_Rate table directly, and
would produce exactly the same result.

Larry Linson
Microsoft Office Access 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