Kamis, 20 Agustus 2015

Re: [MS_AccessPros] Need Syntax help please.

 

Wow, I still haven't got this right. I'm getting runtime error 3075. Syntax error in query expression. The query I'm converting to VBA runs fine.  Here is what is showing in the immediate window when I debug.print.


INSERT INTO tblInterCoTemp ( Account, Credit, Line_Descripton, Invoice )
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
FROM Manual_Invoice_Header INNER JOIN Manual_Invoice_Detail ON Manual_Invoice_Header.Invoice = Manual_Invoice_Detail.Invoice
WHERE (((Manual_Invoice_Detail.[Account])<>0) AND ((Manual_Invoice_Header.[Invoice Date]) Between #7/1/2015# And #7/31/2015# AND ((CustomerGroup([Cust]))="CNF"));



Doyce





---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Doyce-

I think there's a missing paren:

"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:26, 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 (7)

.

__,_._,___

Tidak ada komentar:

Posting Komentar