A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Update Query not updating selected table



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 10:08 PM posted to microsoft.public.access.queries
Mkuria
external usenet poster
 
Posts: 17
Default Update Query not updating selected table

I have created an update query to update a master file. When I run the
select query to view the records I need to update - I see the correct data.
When I change query to update query and enter the table to update and run
update query. The query is updating the source table (Change Form) instead
of table indicated (AMT Per MAS) to update to....Strange.. I am using Access
2003
Below is the SQL.


UPDATE [AMT Per MAS] INNER JOIN [Change Form] ON [AMT Per MAS].ID = [Change
Form].ID SET [Change Form].[FROM AMT Assignment] = [AMT Per MAS]![FROM AMT],
[Change Form 2].[TO AMT] = [AMT Per MAS]![TO AMT]
WHERE ((([Change Form].ID) Is Not Null));
--
mmk
  #2  
Old May 27th, 2010, 10:58 PM posted to microsoft.public.access.queries
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Update Query not updating selected table

MKuria -

Your update query is set up to update the [ChangeForm] fields. If you want
to update the [AMT Per MAS] fields, then the query should look like this:

UPDATE [AMT Per MAS] INNER JOIN [Change Form] ON [AMT Per MAS].ID = [Change
Form].ID SET [AMT Per MAS]![FROM AMT] = [Change Form].[FROM AMT Assignment],
[AMT Per MAS]![TO AMT] = [Change Form 2].[TO AMT]
WHERE ((([Change Form].ID) Is Not Null));

--
Daryl S


"MKuria" wrote:

I have created an update query to update a master file. When I run the
select query to view the records I need to update - I see the correct data.
When I change query to update query and enter the table to update and run
update query. The query is updating the source table (Change Form) instead
of table indicated (AMT Per MAS) to update to....Strange.. I am using Access
2003
Below is the SQL.


UPDATE [AMT Per MAS] INNER JOIN [Change Form] ON [AMT Per MAS].ID = [Change
Form].ID SET [Change Form].[FROM AMT Assignment] = [AMT Per MAS]![FROM AMT],
[Change Form 2].[TO AMT] = [AMT Per MAS]![TO AMT]
WHERE ((([Change Form].ID) Is Not Null));
--
mmk

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:39 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.