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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSERT INTO Question

Status
Not open for further replies.

ph74

Technical User
Aug 2, 2001
19
0
0
GB
I am using the following INSERT INTO statement, to insert a users RecordID and a CourseID (CSID)into the training table,

Code:
strInsert = "INSERT INTO training (RecordID, CSID)" & "Values ([RecordID], '" & cboSchedule & "')"
DoCmd.RunSQL strInsert

The problem being, if there is not already an entry in the training table with a RecordID and CSID, then INSERT INTO does not insert anything and does not give any errors.

Any help appreciated.

Paul.
 
strInsert = "INSERT INTO training (RecordID, CSID)" & "Values (" & me.[RecordID] & ", '" & me.cboSchedule & "')"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top