Solved

INSERT INTO: sql and database question

Posted on 1998-10-07
1
192 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
1 Comment
 
LVL 14

Accepted Solution

by:
waty earned 50 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now