I'm trying to perform an update, and I can't avoid this error - I've tried this query what must be 5 different very fundamentally different ways now.
Arg.
I used to be a DBA in large DB2 and SQL Server environments, but I'm a little rusty, plus I'm very new to Access.
I am trying to perform a calculation based on information in a few tables, and use the result to update another.
Should be simple, here's what counts from the tables that matter:
INVENTORY TABLE:
ComponentPartNu mber (key)
Quantity
JOB ORDERS TABLE:
AssemblyNumber (key)
BuildQuantity
ASSEMBLY TABLE:
AssemblyNumber (key)
ReferenceID (key)
ComponentPartNu mber
The JOB ORDERS table contains information on how many assemblies we are contracted to build.
The ASSEMBLY table contains reference ID's for each location in an electronic assembly, and the part number of the component that is placed at each location. One component might be used in several places in an assembly.
The INVENTORY table contains information on how many component parts we have in inventory.
Basically, I'm looking to sum up how many of each component is used in a particular assembly, and multiply that by how many assemblies we built. I want to take that number (by component, of course) and update my inventory by subtracting it from the existing Qty.
No matter what I do, I get the error "Operation must use an updatable query".
I've tried using a stored query to join ASSEMBLY to JOB ORDERS and precalculate a NewQty so I could do a straightforward "set Qty=NewQty", I've tried doing it all in one query - but I can't get around doing a count(*) at some level - and since I can't do that IN my update statement (since I can't do a "group by"), I have to do it in a stored query. But - I'm not updating that query - so I'm nothing if not puzzled by this error! All joins at all times are simple inner joins.
Where am I going wrong here?
Arg.
I used to be a DBA in large DB2 and SQL Server environments, but I'm a little rusty, plus I'm very new to Access.
I am trying to perform a calculation based on information in a few tables, and use the result to update another.
Should be simple, here's what counts from the tables that matter:
INVENTORY TABLE:
ComponentPartNu mber (key)
Quantity
JOB ORDERS TABLE:
AssemblyNumber (key)
BuildQuantity
ASSEMBLY TABLE:
AssemblyNumber (key)
ReferenceID (key)
ComponentPartNu mber
The JOB ORDERS table contains information on how many assemblies we are contracted to build.
The ASSEMBLY table contains reference ID's for each location in an electronic assembly, and the part number of the component that is placed at each location. One component might be used in several places in an assembly.
The INVENTORY table contains information on how many component parts we have in inventory.
Basically, I'm looking to sum up how many of each component is used in a particular assembly, and multiply that by how many assemblies we built. I want to take that number (by component, of course) and update my inventory by subtracting it from the existing Qty.
No matter what I do, I get the error "Operation must use an updatable query".
I've tried using a stored query to join ASSEMBLY to JOB ORDERS and precalculate a NewQty so I could do a straightforward "set Qty=NewQty", I've tried doing it all in one query - but I can't get around doing a count(*) at some level - and since I can't do that IN my update statement (since I can't do a "group by"), I have to do it in a stored query. But - I'm not updating that query - so I'm nothing if not puzzled by this error! All joins at all times are simple inner joins.
Where am I going wrong here?
Comment