Click to See Complete Forum and Search --> : trouble inserting into Access


met12
June 7th, 2004, 02:14 PM
I can't seem to insert into Access table name accrec with the following code. I get no error messages, but the record is not added to the table. Any ideas?

Thanks,
met12


Set dbs = OpenDatabase("c:\vb\invenVB.mdb")
dbs.Execute "Insert into accrec" & "(Acc, Invoice, Check, Invoicedate, Paiddate, Salescredit, Tax, InitialDebit, Balance) VALUES " & "('2332','4444','123123','5/7/2004','5/7/2004','JLT','1.25','9.75','10.00');"
dbs.Close

met12
June 7th, 2004, 02:48 PM
I figured it out. I had one of the fields set to "No Duplicate" and was trying to send the same exact record data more than once. I'm surprised that I didn't get an error message.

My Bad
met12