Wednesday, 11 September 2013

big number for id with insert into statement

big number for id with insert into statement

I am developing an application in Access using vba. I wan't to insert a
temporary table in another table called "Reports". The table Reports has
an id with auto increment. Now my temporary table hasnt got an id. So I
thought Access would automatically change the ID of Reports following the
last ID. (so a new row would get ID = 2 when the last ID = 1). But when I
run my insert into statement Access generates an ID over 5500000, not
followed with my previous record. Does anyone knows what causes this
problem?
strSql = "INSERT INTO Reports SELECT * FROM tblTemp;"
CurrentDb.Execute strSql
Thx for the help
Edit: just found out that he does it too when I just add a record

No comments:

Post a Comment