Hi guys!



I'm having a problem in the INSERT SYNTAX.

I'm currently using MS ACCESS 2007 temporarily because my installer of SQL Server got broken. In my database, I have an "IDNo" set as auto increment so every time I insert a new record it will automatically have a number.

But the problem is that normally in SQL Server you won't require to add the indicated field with an auto increment and if you use a MS ACCESS 2007 as a database, there will be an error in the syntax saying that the number of query values and destination fields are not the same.


Code:
    For x = 1 To lvSubject.ListItems.Count
    
        Set rs = New ADODB.Recordset
        rs.Open "INSERT INTO tblStudinfo VALUES('" & txtStudNo.Text & "', '" & txtFirstName.Text & "', '" & txtMI.Text & "', '" & txtlastName.Text & "', '" & cboGender.Text & "', '" & lvSubject.ListItems.Item(x) & "')", cnx, adOpenKeyset, adLockPessimistic
    
    Next
....before the txtStudNo there is a field named "IDNo" with an auto increment.

Plz help.. ASAP
tnx!