I have a series of very similar Append queries (maybe 18) that I want to run when I clcik on a commad button. I'd rather not actually have all of those queries sitting around, so my plan is to convert them to their SQL code and put them all in the VB code.
I tried just pasting the sql code for one of the queries into the VB routine and not surprisingly it wasn't that simple. Is there something you need to preface it with like "Run SQL..." or something?
This happens to be the code that I tried it with:
INSERT INTO [Planning Quantities] ( IML, Item, [Per Unit Quantity], Units, [Run Qty] )
SELECT "I" AS IML, Products.[Ingredient], Products.[Ingredient Qty], Products.[IngQtyUnit], Products.[Planning Batch Quantity]
FROM Products
WHERE (((Products.InActive)=False));
Thanks.
I tried just pasting the sql code for one of the queries into the VB routine and not surprisingly it wasn't that simple. Is there something you need to preface it with like "Run SQL..." or something?
This happens to be the code that I tried it with:
INSERT INTO [Planning Quantities] ( IML, Item, [Per Unit Quantity], Units, [Run Qty] )
SELECT "I" AS IML, Products.[Ingredient], Products.[Ingredient Qty], Products.[IngQtyUnit], Products.[Planning Batch Quantity]
FROM Products
WHERE (((Products.InActive)=False));
Thanks.