Updating the total of a field by selecting the number to move on a form (1 Viewer)

Sam Summers

Registered User.
Local time
Today, 11:40
Joined
Sep 17, 2001
Messages
825
Hi Everyone,
I am trying to update the quantity (TotalQuantity) of a field in a table (Aerosols) by selecting the quantity to subtract (NumberSelect) on the form (AerosolQuantityChange).
I am trying to use the SQL below but i am getting the error message that the queries name is not a valid name..........

Code:
UPDATE Aerosols SET Aerosols.TotalQuantity = [Aerosols].[TotalQuantity]-[Forms]![AerosolQuantityChange]![NumberSelect]
WHERE (((Aerosols.AerosolID)=[Forms![AerosolQuantityChange].[AerosolID]));

Ultimately i will also create an update query to add the selected amount to a new location.

Been searching for a while now and not really finding anything?

Many thanks in advance
 

Minty

AWF VIP
Local time
Today, 11:40
Joined
Jul 26, 2013
Messages
8,619
If it says the query Name is not valid - what are have you called it?
 

Users who are viewing this thread

Top Bottom