While running the program, i'm getting this error
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/admin/currentmonth.as p, line 26
strSQL = "SELECT RFCInfo.Name, RFCInfo.Date, RFCInfo.RFCNo, RFCInfo.InvNo, RFCInfo.Deleted , InvoiceDetail.Q uantity, InvoiceDetail.D escription, InvoiceDetail.E xtendedPrice, InvoiceInfo.GST , InvoiceInfo.PST , InvoiceInfo.Tot al FROM RFCInfo INNER JOIN (InvoiceDetail INNER JOIN InvoiceInfo ON InvoiceDetail.I nvNo = InvoiceInfo.Inv No) ON RFCInfo.InvNo = InvoiceInfo.Inv No where RFCInfo.DealerI D =" & strDealerID & " AND RFCInfo.Deleted = FALSE And RFCInfo.Date Between Date() And DateAdd("m",-1,Date()) Order By RFCInfo.Date"
---------------^
i need to display last one months records,3 months records, 6 month records and 1 yrs records seperatly. now i'm tring to display 1 month records. but while running this codes, in this sql statement under the "m" (Between Date() And DateAdd("m",-1,Date()) ) error occurs.
and i'm using ASP with Ms Access as database.
anyone have any idea why this error occurs. is this the way we can display the last 1 month records... like wise if we change the -1 to -3,-6 and all the last 3 months, last 6 months will be found out right.
Thanks in advance.
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/admin/currentmonth.as p, line 26
strSQL = "SELECT RFCInfo.Name, RFCInfo.Date, RFCInfo.RFCNo, RFCInfo.InvNo, RFCInfo.Deleted , InvoiceDetail.Q uantity, InvoiceDetail.D escription, InvoiceDetail.E xtendedPrice, InvoiceInfo.GST , InvoiceInfo.PST , InvoiceInfo.Tot al FROM RFCInfo INNER JOIN (InvoiceDetail INNER JOIN InvoiceInfo ON InvoiceDetail.I nvNo = InvoiceInfo.Inv No) ON RFCInfo.InvNo = InvoiceInfo.Inv No where RFCInfo.DealerI D =" & strDealerID & " AND RFCInfo.Deleted = FALSE And RFCInfo.Date Between Date() And DateAdd("m",-1,Date()) Order By RFCInfo.Date"
---------------^
i need to display last one months records,3 months records, 6 month records and 1 yrs records seperatly. now i'm tring to display 1 month records. but while running this codes, in this sql statement under the "m" (Between Date() And DateAdd("m",-1,Date()) ) error occurs.
and i'm using ASP with Ms Access as database.
anyone have any idea why this error occurs. is this the way we can display the last 1 month records... like wise if we change the -1 to -3,-6 and all the last 3 months, last 6 months will be found out right.
Thanks in advance.
Comment