The crucial aspect is to identify what is causing the problem.
If you are using Access 97 without the service packs, you are limited to
1024 databases. Applying the service packs doubles this to 2048, so that's
the first step.
Are you using any of the domain aggregate functions such as DLookup(),
DMax(), ... in a query? Each call opens a database, and they don't clean up
after themselves quickly, so you can easily hit the limit as each row of
your query opens a database. Workarounds:
- Leave the domain aggregate function out of the query, and put it on the
form if you only need to display for the current record.
- Use a subquery in place of the domain aggregate function. More info:
http://support.microsoft.com/?id=209066
Each form, subform, report, subreport, combo, and list box also uses up one
for its RecordSource or RowSource. Do you have lots of forms open, each with
lots of subforms? Or do you have heaps of combos? Can you close some forms,
or redesign with fewer combos?
Next, look at your code. Any code that does an OpenRecordset() ? You need to
explicitly Close the recordset at the end of the procedure, and preferable
set the recordset variable to Nothing as well. Access is actully good at
cleaning up after itself, but not perfect. You can also see if you have lots
of forms where you refer to the RecordsetClone as well. It uses only 1
database variable for each form where you use the RecordsetClone, but these
are not released until the form is closed.
Hope that's enough to help you identify the cause of the message.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Dave" <no***@email.co m> wrote in message
news:Ng******** *********@newsr ead3.news.atl.e arthlink.net...
Has anyone encountered the error message "Can not open any more databases"
and what did you do to solve it?
Thanks,
Dave