?
Solved

INSERT INTO: sql and database question

Posted on 1998-10-07
1
Medium Priority
?
206 Views
Last Modified: 2010-04-30
I want to add user entered data to a database.
db begin my database I am trying to insert values into the database that the user enters in Text1.Text and Text2.Text

db.Execute "INSERT INTO Options ([JobCode],[JobCodeDescription]) VALUES (Text1.Text,Text2.Text)"

The above doesn't work.  How can I get it to work for me.
0
Comment
Question by:movieguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
waty earned 200 total points
ID: 1438576
do as follow :

sSQL = "INSERT INTO Options ([JobCode],[JobCodeDescription]) "
sSQL = sSQL & "VALUES ('" & Text1.Text & "', '" & Text2.Text & "') " 

db.Execute
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

741 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