You need to include the single qoute in your SQL statement:
This because you declara as String.
Code:
 
SQL = "INSERT INTO CandidateHistory(CandidateHistoryID)VALUES ('" & CandidateIdNumber & "')"
Originally posted by johnnyboy23
this is my statement

Code:
SQL = "INSERT INTO CandidateHistory(CandidateHistoryID)VALUES (" & CandidateIdNumber & ")"
but the value that i want should come from my varible because that value changes all the time
called
Code:
dim CandidateIdNumber as string
this this correct????