M
mattc66 via AccessMonster.com
I want to take the SQL from a query and paste it in VBA to work behind a
DoCmd.RunSQL what changes to the SQL Code do I need to make to use it?
This is the Update Query that I want to use:
UPDATE tblQuoteCalc INNER JOIN tblOrderDetails ON tblQuoteCalc.OrderID =
tblOrderDetails.OrderID SET tblOrderDetails.Description = tblQuoteCalc.
Description, tblOrderDetails.WoodType = tblQuoteCalc.WoodType,
tblOrderDetails.W = [tblQuoteCalc].[Width], tblOrderDetails.L = [tblQuoteCalc]
..[Length], tblOrderDetails.H = [tblQuoteCalc].[Height], tblOrderDetails.Cost
= tblQuoteCalc.Cost, tblOrderDetails.ListPrice = tblQuoteCalc.ListPrice
WHERE (((tblOrderDetails.Item)="ROOM"));
Why not just execute the Query in code? Because when I do it says the query
is empty. It's a timing issue from when the data is available in the
QuoteCalc to then be copies over to the OrderDetail table.
Thanks
Matt
DoCmd.RunSQL what changes to the SQL Code do I need to make to use it?
This is the Update Query that I want to use:
UPDATE tblQuoteCalc INNER JOIN tblOrderDetails ON tblQuoteCalc.OrderID =
tblOrderDetails.OrderID SET tblOrderDetails.Description = tblQuoteCalc.
Description, tblOrderDetails.WoodType = tblQuoteCalc.WoodType,
tblOrderDetails.W = [tblQuoteCalc].[Width], tblOrderDetails.L = [tblQuoteCalc]
..[Length], tblOrderDetails.H = [tblQuoteCalc].[Height], tblOrderDetails.Cost
= tblQuoteCalc.Cost, tblOrderDetails.ListPrice = tblQuoteCalc.ListPrice
WHERE (((tblOrderDetails.Item)="ROOM"));
Why not just execute the Query in code? Because when I do it says the query
is empty. It's a timing issue from when the data is available in the
QuoteCalc to then be copies over to the OrderDetail table.
Thanks
Matt