Speaker of the House
Posts: 1199
Posted: 05/22/05 08:02:58am
I have two tables, ACCOUNT and JOURNALENTRY. When a user adds data to JOURNALENTRY, namely an Amount, a macro runs and is supposed to UPDATE the ACCOUNT Amount field with the posted JOURNALENTRY Amount field. Note, I need this update to either add/subtract to the ACCOUNT Amount. My macro runs without error except for the fact nothing gets updated. I'm doing this in Access. Here's my macro:
| CODE |
UPDATE ACCOUNT,JOURNALENTRY SET ACCOUNT.Amount = JOURNALENTRY.Amount WHERE JOURNALENTRY.AccountNumber = ACCOUNT.AccountNumber
|
Am I not properly using this function? I've Google'd for the past 24 hours and can't find a solution. I hope someone can help!!
Posted: 05/22/05 12:58:18pm
It might just be that you need ' and ' around the values that you are updating with.
so it'd be:
| CODE |
UPDATE ACCOUNT,JOURNALENTRY SET ACCOUNT.Amount = 'JOURNALENTRY.Amount' WHERE JOURNALENTRY.AccountNumber = 'ACCOUNT.AccountNumber' |