Project #81136 - MS Access: Make button and query/subquery

There are 3 tables in the database; PTV1, PTV2 and OAR.
I would like a query that would search field Volume in PTV1 for the value nearest to 2. Then take the value in the Dose column and use update to add this value to record 1, field 1 in the OAR table. I need this query to run when a button is pressed. 

I have some of the SQL code written but I can't get it working

UPDATE OAR SET OAR.Field1 = (SELECT TOP 1 [PTV1]![Dose]/100
FROM [PTV1]
WHERE [PTV1]![Volume]-2)
WHERE (((OAR.OARSer)=1));

Subject Computer
Due By (Pacific Time) 09/07/2015 12:00 am
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy