Link to home
Start Free TrialLog in
Avatar of TOWELLR
TOWELLR

asked on

Access VBA insert a record with html tags

Getting an invalid syntax msg when I try to build an html tagged value string and insert it into a column.

Any suggestions for fixing this statement?  Do some of these characters require special handling?

strSQL = "Insert into [Session Detail Table] (Session) select ""<strong>"" & [Session Name] & ""</strong>"" & "" < br > "" FROM Import1"

Thanks for any suggestions
SOLUTION
Avatar of Anthony Berenguel
Anthony Berenguel
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TOWELLR
TOWELLR

ASKER

for some reason no matter how I build the insert it gives an error.
When I look at the insert statement it builds in a MsgBox it looks good.
Then it bombs with this error:

Run-time error '-2147467259 (800004005):
Method 'Execute' of object '_Connection' failed
Please post all the VBA code you are actually using for this task.