Solved

Missing Operator

Posted on 2004-10-08
1
215 Views
Last Modified: 2009-07-29
want to to a insert

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

and just get a missing operator error
0
Comment
Question by:ziwez0
1 Comment
 
LVL 12

Accepted Solution

by:
pique_tech earned 50 total points
ID: 12257910
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question