Greetings,
in new territory here. pasted this sql statement from a working append query to VB tried a couple of different things to make it work still getting a compile error.
Appreciate the assistance.
SSQL = "INSERT INTO tblEvents ( BillID, BorID, OpenDate, Status, ClosedDate, Reason," & _
"Type, [Task $] ) SELECT tempBillingTable.Billid, tempBillingTable.BorID, tempBillingTable.BOpenDate," & _
"tblStatus.Status, tempBillingTable.BClosedDate, tblOpenReason.OpenReason, IIf([Billid] Is Not Null,"Billing","") AS Type," & _
"tempBillingTable.BilledAmt FROM (tempBillingTable LEFT JOIN tblStatus ON tempBillingTable.Status = tblStatus.StatusID) LEFT JOIN tblOpenReason ON tempBillingTable.BOpenReason = tblOpenReason.OpenID"
DoCmd.RunSQL SSQL
in new territory here. pasted this sql statement from a working append query to VB tried a couple of different things to make it work still getting a compile error.
Appreciate the assistance.
SSQL = "INSERT INTO tblEvents ( BillID, BorID, OpenDate, Status, ClosedDate, Reason," & _
"Type, [Task $] ) SELECT tempBillingTable.Billid, tempBillingTable.BorID, tempBillingTable.BOpenDate," & _
"tblStatus.Status, tempBillingTable.BClosedDate, tblOpenReason.OpenReason, IIf([Billid] Is Not Null,"Billing","") AS Type," & _
"tempBillingTable.BilledAmt FROM (tempBillingTable LEFT JOIN tblStatus ON tempBillingTable.Status = tblStatus.StatusID) LEFT JOIN tblOpenReason ON tempBillingTable.BOpenReason = tblOpenReason.OpenID"
DoCmd.RunSQL SSQL