I AM using loops to update records. For example, I have a subform that
allows users to change the position of records by changing the sequence
numbers and then clicking a button that renumbers the records in increments
of 10.
Unless you are setting a reference to CurrentDb() each time you pass through the
loop, the performance issue doesn't arise.
But I don't see why using only "set db = currentDB()" before opening a
recordset should be leading to problems.
I am getting messages I have never seen before (in 7 yrs of Access) and
started wondering if it was a problem with the server.
(the client has an IBM i-series that they use as their AS400 and to host 18
outlook accounts.)
It's hard to say where you problem originates as you haven't posted any code for
us to look through. There may be another issue with your code (and I'm not
immune to those after my 8 years of Access). Take a look at the following MS
Knowledge Base article for some information that might help:
ACC2000: "Object Invalid or No Longer Set" Error with CurrentDb
http://support.microsoft.com/default.aspx?scid=kb;en-us;200592
Then, again, it may be that your VBA contains some corruption and you need to
"decompile" the MDB (there seems to be a rash of corruption in the last couple
of weeks!!). For information on that, see the following:
http://www.databasecreations.com/DatabasePerformanceTips.pdf
http://www.granite.ab.ca/access/decompile.htm
http://www.trigeminal.com/usenet/usenet004.asp?1033
The procedure I use when implementing this is as follows:
1) BACK UP YOUR MDB FILE!
1) BACK UP YOUR MDB FILE! (I meant it the first time <g>)
2) Compact the MDB.
3) Implement the "/decompile" as described in the articles I referenced.
(Access 2000, and later, don't provide the confirmation dialog that
existed in Access 97, but the decompile will still take place.)
4) Open Access normally and compact the MDB again to clean up.
5) Compile and save.
6) Compact again before testing/using.
To give you an example of some freaky things going on. A user printed a
record and its details displayed in a form/subform(clicked a print button)
and then left the database in a minimized state to run some other task. Upon
maximizing it to carry on, her subform records were littered with "#delete"
spread over all the fields in multiple records.
Is your back-end file an MDB or of another type?
I am thinking it may be better to just import records locally, allow a user
to manipulate data and then use delete and append queries to send the data
back to the back end tables
Not enough information at this end to comment.