Wednesday, June 27, 2012

One more source for Can’t open any more databases

Error message 3048 "Can’t open any more databases" typically occurs when you often call CurrentDB. But one more case when it can happens – if DLookup() functions (like DFirst(), DMax(), etc) are called many times. I was hit by this error in Access report with subreport. Subreport had a call to DFirst(), and when user run report several times plus made report export to PDF – error occurred in very odd places. Look at Allen Browne Extended DLookup() for a replacement.

7 comments:

  1. I have created a pop-up form that tells you how many database connections are still available and how many have been used. As you open new forms, it will report on how the availability changes. I have database with a lot of complex queries and forms and would get this error if I opened too many at once. Now that I understand how it works I can track down where all the overhead is being used.

    I'd like to share my form but I don't know where to post it. I was hoping you could accept files here. Alex, can you suggest where I can post it?

    Ben

    ReplyDelete
    Replies
    1. Ben
      I'm having trouble with a client who has this error constantly and your form would be a real godsend. Can you post it? Or the code as suggested below?

      Thanks!

      Ondine

      Delete
  2. Hi Ben,
    you can put it in skydrive public folder and post linki here. Or send it to my email alexdyb@hotmail.com, i will put it somewhere and add link

    ReplyDelete
  3. Ben,

    If you can share your code that would be a tremendous help. I tried doing the same thing a few years ago but never got it working right.
    Thanks,

    Isaac Richter

    ReplyDelete
  4. Has Ben's form been posted anywhere?

    ReplyDelete
  5. Anonymous2:17 PM

    Brilliant, thanks!

    Ondine

    ReplyDelete