Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query

Status
Not open for further replies.

Legends77

Technical User
Jan 18, 2009
57
US
Sorry if this is a duplicat post but had a "glitch" and explorer went "mad" for a moment.

Having a problem getting a update query to work properly and think it is a simple fix but unable to find any examples to go by.

Need to update the field PPM on the table MonthlyPPM with the data from field MPPM in query3. Criteria would be query3.fy = monthlyppm.year and query3.monthID = monthlyppm.monthno

Any ideas or suggestions are greatly appreciatated and thanks in advance for any help.
 
You would need to join on primary and foreign keys or at least a unique value from one of the tables.

If you can't define that in your query, you should be able to use the much slower DLookup() type expression.

If you can't figure this out on your own, you need to reply back with more information about your tables and fields.

Duane
Hook'D on Access
MS Access MVP
 
Try something like
Code:
UPDATE MonthlyPPM INNER JOIN query3
       ON query3.fy = MonthlyPPM.year 
          AND query3.monthID = MonthlyPPM.monthno

SET MonthlyPPM.PPM = query3.MPPM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top