Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert into statement errors 1

Status
Not open for further replies.

iXPhound

Technical User
Feb 25, 2001
146
US
Hi all! When I attempt to use the Insert into statement I get an Expected: end of statement error and it highlights the insert to TABLE name.

E.G.

INSERT INTO Employees (FirstName, LastName, Title) VALUES ('Harry', 'Washington', 'Trainee');

I have upgraded to Access SR-2 with no success. Is there sometime of reference that I have to turn on, or a specific order it has to be in?

Anyone know why I might be getting this error. Your help is really appreciated!!! TIA!
 
to run the statement as it is I believe you paste it into a new query's sql window then run it.

to run it as code you could put the following in a new module:

dim strSql as string
'next is all on one line
strSql = "INSERT INTO Employees (FirstName, LastName, Title) VALUES ('Harry', 'Washington', 'Trainee')"

docmd.runsql strsql
 
fmbpcsup,

Thanks a lot that worked. I really appreciate it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top