-
Access 2003 VBA
Can someone please help me with a simple question -
I'm using a DAO connection in an Access database. I want to simply add some new records that are coming in from a table. I'm using the following commands:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Dim str As String
str = "select * from Mytable" - I don't think this is necessary????
Set rs = db.OpenRecordset(str) ?????
With rs
.AddNew
!batch = PTbl
!Item = PSrCnt
.Update
End With
I just want to add records to a table. Mytable has thousands of records and this routine is taking 30 seconds to add 4 records. I don't need to select all the records in Mytable but I don't know what code to use. Thank you.
-
Re: Access 2003 VBA
MAB
You would be much better served by using an ADO connection and passing your inserts into a command object
-
Re: Access 2003 VBA