Expand my Community achievements bar.

Insert data into Access with Auto-Increment column

Avatar

Former Community Member
Is there anyone out there that has come across this problem I am experiencing?



I have a form I'm trying to submit to an Access DB that has an Auto-Incremented Table Column. I have followed Stefan Cameron's instructions to a "T" on his blog page here:

http://forms.stefcameron.com/2006/09/18/connecting-a-form-to-a-database/

but I keep getting the following error"



GeneralError: Operation failed.

XFAObject.open:10:XFA:form1[0]:mysubform[0]:myEIFform[0]:overflowLeader[0]:Submit[0]:click

open operation failed. [Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same.



My OLEDB Connection Record Source is the SQL Query which reads: SELECT FedTaxID, LegalID FROM dbtest; My simple test DB is Access and its only 3 columns; dbID, FedTaxID, LegalID. dbID is the Auto-Incremented Column.



If I remove the Auto column from my DB table it inserts just fine but I get this error:



GeneralError: Operation failed.

XFAObject.open:10:XFA:form1[0]:mysubform[0]:myEIFform[0]:overflowLeader[0]:Submit[0]:click

ado2xfa operation failed. Item cannot be found in the collection corresponding to the requested name or ordinal.



I've looked over alot of the blogs and other help forums and there's info on Selects, I don't find much on Inserts.



Can anyone direct me in the right direction? Thank you.
0 Replies