G
Guest
I have a table whose primary key is an autonumber field. I have Access Basic code that is reading data from a .csv file and adding records to the database. The csv file is not tabular in nature. It contains comment lines that indicate the nature of the following line of data. The code uses the comment line to determine the table that the data is added to
The code sequence does the following with the data after reading the comment line
1. create TableDef object on Table
2. open recordset using tabledef objec
3. AddNew to record se
4. Update record se
5. close recordse
6. does some other cod
and then if finds a comment line that has additionalal data to add to record added in step 3 &
7. create TableDef for same table as step
8. open recordset using tablede
9. MoveLast on record se
At this point the recordset does not contain the record that was added in steps 3 & 4. The Table properties has order by set to the primary key. I can repeatedly perform the AddNew method to this table and the new records will show up if I open the table. However, all of the MoveLast methods against a record set for this table returns the same record all of the time. The record returned has a primary key that is well below all of the new records added
There is no change in this behavior if I close the Database and reopen it
I am using Access 2003
Does anyone have a suggestion to get around this problem with MoveLast?
The code sequence does the following with the data after reading the comment line
1. create TableDef object on Table
2. open recordset using tabledef objec
3. AddNew to record se
4. Update record se
5. close recordse
6. does some other cod
and then if finds a comment line that has additionalal data to add to record added in step 3 &
7. create TableDef for same table as step
8. open recordset using tablede
9. MoveLast on record se
At this point the recordset does not contain the record that was added in steps 3 & 4. The Table properties has order by set to the primary key. I can repeatedly perform the AddNew method to this table and the new records will show up if I open the table. However, all of the MoveLast methods against a record set for this table returns the same record all of the time. The record returned has a primary key that is well below all of the new records added
There is no change in this behavior if I close the Database and reopen it
I am using Access 2003
Does anyone have a suggestion to get around this problem with MoveLast?