N
NeoFax
I am getting the following suntax error: "Syntax error in string in
query expression '[MonthNum]=6'""(second quote is not in the error
screen). Here is my DSum expression: Test:
DSum("Units","tblMonthlyUnits","[MonthNum]=" &
CStr(DatePart("m",dhpreviousworkdaya(Date()))) & """"). The
tblMonthlyUnits is set up as follows:
MonthNum(Dbl) Sample: 1, 2, 3, 4, 5, ...
MonthName(Txt) Sample: Jan, Feb, Mar, Apr, ...
Units(Dbl) Sample: 2.51, 2.03, 2.67, 1.89, 2.54, ...
Why am I getting the error? If I change the criteria part of the DSum
to "[MonthNum]=6", it works fine. I have tried without changing the
DatePart function to a string, also changing to Double with CDbl and
without change at all and I receive the same error. Could it be the 4
quotation marks at the end?
query expression '[MonthNum]=6'""(second quote is not in the error
screen). Here is my DSum expression: Test:
DSum("Units","tblMonthlyUnits","[MonthNum]=" &
CStr(DatePart("m",dhpreviousworkdaya(Date()))) & """"). The
tblMonthlyUnits is set up as follows:
MonthNum(Dbl) Sample: 1, 2, 3, 4, 5, ...
MonthName(Txt) Sample: Jan, Feb, Mar, Apr, ...
Units(Dbl) Sample: 2.51, 2.03, 2.67, 1.89, 2.54, ...
Why am I getting the error? If I change the criteria part of the DSum
to "[MonthNum]=6", it works fine. I have tried without changing the
DatePart function to a string, also changing to Double with CDbl and
without change at all and I receive the same error. Could it be the 4
quotation marks at the end?