I just did a quick cursory scan, so give this answer that amount of weight,
but it looks like the "!" should be a period in the section of your SQL: "
,TblResults!AHS = "
If this works out to be the problem, then formatting the code for your SQL
string a little differently should enable you to tell the difference between
the SQL portion of the string and the VBA code to supply values/arguments
dynamically.
--
Jeffrey R. Bailey
"Norman Fritag" <mt*****@ozemail.com.au> wrote in message
news:hQ***************@nnrp1.ozemail.com.au...
hi there,
StrSql = "UPDATE TblResults SET TblResults.DOHID = " & intnum1 & _
" ,TblResults!AHS = " & chr(34) & txtAHSto & chr(34) _
& " WHERE (((TblResults.DOHID)=& " Intnum2 & "));"
what's going wrong with this sql statement. It produces an error at the
textstring. saying ... 'AHStext". error??
any hints??
Regards
Norman