C
Cindy
Can anyone help. I have the code below and what I am
trying to do is Add records to the TarkettTest table by
pulling TktCUSTNum from TarkettDistributors and feeding
the values of variables defined in code as MyYear and
RebatePercent. InsertSQL is my string variable.
InsertSQL = ""
InsertSQL = "INSERT INTO "
InsertSQL = InsertSQL & "TarkettTest "
InsertSQL = InsertSQL & "([TktCUSTNum], [Year],
[PurchPcntAbove]) "
InsertSQL = InsertSQL & "SELECT "
InsertSQL = InsertSQL & "TarkettDistributors.TktCUSTNum,
MyYear AS [Year], RebatePercent AS [PurchPcntAbove] "
InsertSQL = InsertSQL & "FROM "
InsertSQL = InsertSQL & "TarkettDistributors;"
DoCmd.RunSQL (InsertSQL)
Thank you.
Cindy
trying to do is Add records to the TarkettTest table by
pulling TktCUSTNum from TarkettDistributors and feeding
the values of variables defined in code as MyYear and
RebatePercent. InsertSQL is my string variable.
InsertSQL = ""
InsertSQL = "INSERT INTO "
InsertSQL = InsertSQL & "TarkettTest "
InsertSQL = InsertSQL & "([TktCUSTNum], [Year],
[PurchPcntAbove]) "
InsertSQL = InsertSQL & "SELECT "
InsertSQL = InsertSQL & "TarkettDistributors.TktCUSTNum,
MyYear AS [Year], RebatePercent AS [PurchPcntAbove] "
InsertSQL = InsertSQL & "FROM "
InsertSQL = InsertSQL & "TarkettDistributors;"
DoCmd.RunSQL (InsertSQL)
Thank you.
Cindy