Thanks John, I swear I tried everything but that combination with the # inside the quotes. That being said, I'm still getting error 3075 that says there is a syntax error in query expression. Here is the revised SQL statement:
strSQLCredit = "INSERT INTO tblInterCoTemp ( Account, Credit, Line_Descripton, Invoice ) " & vbCrLf & _
"SELECT Manual_Invoice_Detail.Account, ([Qty]*[Price]) AS Credit, [Manual_Invoice_Detail]![Invoice] & "" "" & [Manual_Invoice_Detail]![Description] & "" ("" & [Qty] & "")"" AS [Line Description], Manual_Invoice_Detail.Invoice " & vbCrLf & _
"FROM Manual_Invoice_Header INNER JOIN Manual_Invoice_Detail ON Manual_Invoice_Header.Invoice = Manual_Invoice_Detail.Invoice " & vbCrLf & _
"WHERE (((Manual_Invoice_Detail.[Account])<>0) AND ((Manual_Invoice_Header.[Invoice Date]) Between #" & StartDate & "# And #" & EndDate & "# AND ((CustomerGroup([Cust]))=""CNF""));"
Doyce
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Like this:
"WHERE (((Manual_Invoice_Detail.[Account])<>0) AND ((Manual_Invoice_Header.[Invoice Date]) Between #" & StartDate & "# And #" & EndDate & "# AND ((CustomerGroup([Cust]))=""CNF""));"
John Viescas
Sent from my iPad
> On Aug 20, 2015, at 22:07, winberry.doyce@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
>
> "WHERE (((Manual_Invoice_Detail.[Account])<>0) AND ((Manual_Invoice_Header.[Invoice Date]) Between #StartDate# And #EndDate# AND ((CustomerGroup([Cust]))=""CNF""));"
Posted by: winberry.doyce@roadsysinc.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar