Mark Carlyle via AccessMonster.com wrote:
I have this update query that I am trying to run. I know the syntax is
messed up but do not know how to correct it.
Select 'UPDATE', Transactions,'Set [balance] =[Daily Balance] where [Id]=
[Idalias]' From "Get Daily Balances"
Transactions = name of the table I want to update
balance = name of the field i want to update
daily balance= name of the query result that I want to move to the table
(this is the result of a Dsum)
ID=primary key in the table
IDalias = the query resulting copy of the ID number
Get daily balances = the name of the query that I need to update from
Thanks in advance for the help on writng the query correctly
Mark
Can you use Access to create it? Open up the query designer
(Query/New/Design) and select/add table/query Transactions and "Get
Daily Balances". If needed, create a relationship line between the ID
fields. Now, drag the Balance field from Transactions. From the menu
select Query/Update to change it to an update query. In the Update row
for Balance, enter [Get Daily Balances]![Daily Balance]. Save and run.
You should end up with a query similar to this.
UPDATE Transactions INNER JOIN [Get Daily Balances] ON Transactions.ID =
[Get Daily Balances].IDAlias SET Transactions.Balance = [Get Daily
Balances]![Daily Balance];
Just curious. Why do people put spaces into table and query names? To
create more work for themselves?