|
-
Jul 27th, 1999, 05:34 PM
#1
Thread Starter
New Member
I'm using an Access database ... what I need to able to do is create another table and populate it with the information I'm selecting.
I have ComboBoxes, being populated with AddNew statements (which comes from a table called Transcripts). I'm doing this with an SQL Select statement .. where StudID is equal to ...whatever .. then the student courses are listed in the ComboBoxes .. Then I need to be able to write what has been selected in the ComboBoxes to a new table (called checksheet) in the database .. I would like to do this with an SQL Statement ...
Any Ideas ?
-
Jul 27th, 1999, 05:55 PM
#2
Lively Member
Hi,
Try this:
Dim sSQL As String
Dim cn as Connection (ADO,DAO whichever)
Connect to the database - I will assume that you already know how to do this.
sSQL = "INSERT INTO checksheet (STUDID, COURSE) VALUES('" & cboStudid.text & "', '" _
& cboCourse.text & "')"
cn.execute sSQL
cboStudid.text is the student ID combo box (I assumed that this was declared as string. If it not a string then remove the single quotes)
cboCourse.text is the course combo box.
Hope this helps,
Preeti
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|