Link to home
Start Free TrialLog in
Avatar of _Esam
_Esam

asked on

How to insert data autoincrement field (MS Access)

Hi,
I will need to insert data to a table where the primary key is autoincremented.

Assuming my PK is CT_ID (autonumber)
The symbol (?) corresponds to CT_ID

What would be the syntax for the following insert:

strInsert = "insert into COURSES_TAKEN (?, UST_ID, COURSE_ID, SEMESTER, [YEAR], GRADE) values ( ?, 1111, 'CRSID', 'SPRING', 2005, 'A')"

Let me know ..
Thanks.

_Esam
ASKER CERTIFIED SOLUTION
Avatar of sajuks
sajuks

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of _Esam
_Esam

ASKER

Indeed, ignored them, and worked ..

Thanks.
_Esam