Hi,
I have this line of code in a module:
sqlMonth = "SELECT MIN(NumberOfMonths) as LastPostMonth FROM PCS_BUDGET_PATS_LIST GROUP BY PATNM HAVING PATNM = " & rst!PATNM
I first got an error that there is an extra comma because the actual data value in the rst!PATNM has a comma. I tried to do many things but I keep getting a syntax error no matter how I tried to cast the rst!PATNM field.
Please let me know what the correct way of trying to concatenate that field in the sql string statement.
Thanks
Mo
I have this line of code in a module:
sqlMonth = "SELECT MIN(NumberOfMonths) as LastPostMonth FROM PCS_BUDGET_PATS_LIST GROUP BY PATNM HAVING PATNM = " & rst!PATNM
I first got an error that there is an extra comma because the actual data value in the rst!PATNM has a comma. I tried to do many things but I keep getting a syntax error no matter how I tried to cast the rst!PATNM field.
Please let me know what the correct way of trying to concatenate that field in the sql string statement.
Thanks
Mo