S
Sean
Below is the append query I have. The data comes from a spreadsheet where
the data changes everytime the preadsheet is generated. I have this append
query to gather the data from the spreadsheet and insert it into a table and
the query also adds the date it was added ( I use this table for historical
reporting). How do I convert this query into code i can put into a module
and how do I write it so it only performs this function once per day. So if
I put this code on a click event, it will check 1st to see if it has been ran
that day, if so, it will not run it and go onto the next event. Thanks,
INSERT INTO Backlog ( Import_Date, [Sales Doc#], Item, HgLvIt, [PO number],
[Create By], [Sold-to #], [Sold-to Name], [Ship-to Name], [Cust Val], [Fwd
Agent Name], Vendor, [Vendor Name], [Vendor PO], Material, [Plan Hier], SLoc,
Description, [Material Ref], [Customer Material Number], MRPCn, MRP, PrCtr,
[Product hierarchy], SU, [Del Grp], MD, SC, CH, HDB, LDB, PGRP, RPLT, [Spc
Stk In], [Order Ackn Nbr], Unit, [Created on], [Order qty], [Open Qty], [Open
Val], [Curr#], [Tgt GI Dt], [Rsch MA Dt], [On Hand Qt], [ATP Qty] )
SELECT Date(), [Sales Doc#], Item, HgLvIt, [PO number], [Create By],
[Sold-to #], [Sold-to Name], [Ship-to Name], [Cust Val], [Fwd Agent Name],
Vendor, [Vendor Name], [Vendor PO], Material, [Plan Hier], SLoc, Description,
[Material Ref], [Customer Material Number], MRPCn, MRP, PrCtr, [Product
hierarchy], SU, [Del Grp], MD, SC, CH, HDB, LDB, PGRP, RPLT, [Spc Stk In],
[Order Ackn Nbr], Unit, [Created on], [Order qty], [Open Qty], [Open Val],
[Curr#], [Tgt GI Dt], [Rsch MA Dt], [On Hand Qt], [ATP Qty]
FROM DailyBackLog;
the data changes everytime the preadsheet is generated. I have this append
query to gather the data from the spreadsheet and insert it into a table and
the query also adds the date it was added ( I use this table for historical
reporting). How do I convert this query into code i can put into a module
and how do I write it so it only performs this function once per day. So if
I put this code on a click event, it will check 1st to see if it has been ran
that day, if so, it will not run it and go onto the next event. Thanks,
INSERT INTO Backlog ( Import_Date, [Sales Doc#], Item, HgLvIt, [PO number],
[Create By], [Sold-to #], [Sold-to Name], [Ship-to Name], [Cust Val], [Fwd
Agent Name], Vendor, [Vendor Name], [Vendor PO], Material, [Plan Hier], SLoc,
Description, [Material Ref], [Customer Material Number], MRPCn, MRP, PrCtr,
[Product hierarchy], SU, [Del Grp], MD, SC, CH, HDB, LDB, PGRP, RPLT, [Spc
Stk In], [Order Ackn Nbr], Unit, [Created on], [Order qty], [Open Qty], [Open
Val], [Curr#], [Tgt GI Dt], [Rsch MA Dt], [On Hand Qt], [ATP Qty] )
SELECT Date(), [Sales Doc#], Item, HgLvIt, [PO number], [Create By],
[Sold-to #], [Sold-to Name], [Ship-to Name], [Cust Val], [Fwd Agent Name],
Vendor, [Vendor Name], [Vendor PO], Material, [Plan Hier], SLoc, Description,
[Material Ref], [Customer Material Number], MRPCn, MRP, PrCtr, [Product
hierarchy], SU, [Del Grp], MD, SC, CH, HDB, LDB, PGRP, RPLT, [Spc Stk In],
[Order Ackn Nbr], Unit, [Created on], [Order qty], [Open Qty], [Open Val],
[Curr#], [Tgt GI Dt], [Rsch MA Dt], [On Hand Qt], [ATP Qty]
FROM DailyBackLog;