Missing Operator

want to to a insert

ssql = "INSERT INTO tblhotel (hotelname) VALUES (" & Me.txthotelname & ")"

and just get a missing operator error
LVL 2
ziwez0Asked:
Who is Participating?
 
pique_techConnect With a Mentor Commented:
You have to properly delimit me!txthotelname as a string with single quotes, like so:

ssql = "INSERT INTO tblhotel (hotelname) VALUES ('" & Me.txthotelname & "')"
                                                                        ^^                                ^^
                                                                     here                             and here
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.