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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query not working

Status
Not open for further replies.

Mashieman9

Technical User
Jul 16, 2003
9
0
0
US
I have three tables, one of which has dynamicall generated information through a form and a module. The info in the dynamic table comes from the other tables. I'm trying to run an update query to update one of the static tables. I'm trying to use a field in the dynamic table in the expression in the SET statement of the query. It tries to update, but tells me there is a conversion problem. I checked all the datatypes and all relevant fields are exactly the same. Any help would be much appreciated! Thanks!

--
N.Hunt
 
Can you exolain more exactly your problem or more better send piece of code may be I can help you
REGARDS Oldkrot
 
The Update Query:

UPDATE Components
SET Components.QtyStock = Components.QtyStock-(BuildQuantity*OutputTable.NumberRequired)
WHERE (((Components.ComponentID) In (SELECT ComponentID FROM OutPutTable)));

'Components' and 'Assemblies' are the static tables, and 'OutPutTable' is the dynamic table. I haven't used any VBA for this query, and I don't think I should have to. The Output table displays a given assembly, as selected in the form. NumberRequired (in outputtable) is the same value as in the assembly table, but is multiplied (through a module) by a subassembly multiplier (for multiple levels of assemblies). BuildQuantity is a value that the user should be prompted for a parameter right before run-time. Thanks for the help.. if you need anymore info on it, just let me know. THanks.


--
N.Hunt
 
One problem is that when I run the query... it asks me for a value for OutputTable.NumberRequired, which it shouldn't because there should be a value for it in the table.

--
N.Hunt
 
Ha! It worked, I just needed more references. Cool!

--
N.Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top