473,547 Members | 2,653 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot open any more databases.

While trying to print a report from Access the user receives the
following error:

Cannot open any more databases.
Okay Help

Does anyone have any ideas about this behavior?
Thank you very much.

Nov 13 '05 #1
6 18801
The message means that Access is trying to open too many connections to the
database.

Access sets aside memory space for 2048 database connections. The kinds of
things that use database connections include:

a) Forms and reports (including subforms and subreports): close any you
don't need.

b) Forms/reports that contains lots of list/combo boxes across the record.

c) Forms/reports/queries that use the domain aggergate functions, such as
DLookup(), DMax().

d) Code that opens recordsets, and fails to close them and set the objects
to Nothing.

e) Referring to the RecordsetClone of forms (even where you do set the
objects to nothing.

f) Recursive code that opens recordsets.

b, c, and d are the most common culprits.

BTW, if you are using the original Access 97, only 1024 database connections
were available, so you need to apply SR2.

--
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.

"ultraton" <ul******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
While trying to print a report from Access the user receives the
following error:

Cannot open any more databases.
Okay Help

Does anyone have any ideas about this behavior?
Thank you very much.

Nov 13 '05 #2
Thank you, Allen.
I believe that (b) and/or (c) are the problem.
How should it proceed to fix it?
I am using Access2000.

Nov 13 '05 #3
For (b), redesign the table. If you have lots of repeating fields, create
another table that contains many records related to the first one instead.

For (c), you may be able to use a subquery, or perhaps a replacement for
DLookup() that cleans up after itself. There's one here:
http://allenbrowne.com/ser-42.html
Or you may be able to move the DLookup() into the Control Source of the text
box on the form, so it is not calculated for all records.

--
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.

"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:42******** *************** @per-qv1-newsreader-01.iinet.net.au ...
The message means that Access is trying to open too many connections to
the database.

Access sets aside memory space for 2048 database connections. The kinds of
things that use database connections include:

a) Forms and reports (including subforms and subreports): close any you
don't need.

b) Forms/reports that contains lots of list/combo boxes across the record.

c) Forms/reports/queries that use the domain aggergate functions, such as
DLookup(), DMax().

d) Code that opens recordsets, and fails to close them and set the objects
to Nothing.

e) Referring to the RecordsetClone of forms (even where you do set the
objects to nothing.

f) Recursive code that opens recordsets.

b, c, and d are the most common culprits.

BTW, if you are using the original Access 97, only 1024 database
connections were available, so you need to apply SR2.
"ultraton" <ul******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
While trying to print a report from Access the user receives the
following error:

Cannot open any more databases.
Okay Help

Does anyone have any ideas about this behavior?
Thank you very much.

Nov 13 '05 #4
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in
news:42******** *************** @per-qv1-newsreader-01.iinet.net.au :
The message means that Access is trying to open too many
connections to the database.
No always. When you run out of table handles, you can receive the
same error message.
Access sets aside memory space for 2048 database connections. . .
Uh, you mean table handles here, not connections.
. . . The
kinds of things that use database connections include:

a) Forms and reports (including subforms and subreports): close
any you don't need.
It's not forms or reports that use table handles, its their
*recordsources* .
b) Forms/reports that contains lots of list/combo boxes across the
record.

c) Forms/reports/queries that use the domain aggergate functions,
such as DLookup(), DMax().

d) Code that opens recordsets, and fails to close them and set the
objects to Nothing.

e) Referring to the RecordsetClone of forms (even where you do set
the objects to nothing.

f) Recursive code that opens recordsets.

b, c, and d are the most common culprits.

BTW, if you are using the original Access 97, only 1024 database
connections . . .
Table handles. The error message is erroneous, as it points to the
wrong problem.
. . . were available, so you need to apply SR2.


The key is:

Every dataset and data subset uses a table handle.

A form's recordsource uses a table handle.

Each table or query in the recordsource uses a table handle. Thus, a
SQL recordsource with one table uses TWO table handles.

A query used in a recordsource uses 1 table handle for the query and
one for each table/query it includes. A recordsource with one table
and one query will use a minimum of 4 table handles (1 for the
recordsource, one for the table, one for the query, one for the
table that the query is wrapped around).

Then, as you say, each control with a rowsource uses table handles
in the same way.

Add to that the wrinkle of replication, which keeps a whole host of
replication tables open in the background, unbeknownst to you, and
thus adds a bunch of table handles to the process (perhaps even
doubling the number -- I don't know for certain).

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #5
"ultraton" <ul******@gmail .com> wrote in
news:11******** *************@o 13g2000cwo.goog legroups.com:
I believe that (b) and/or (c) are the problem.
How should it proceed to fix it?
I am using Access2000.


1. Don't populate a form, subform, listbox or combo box until it's
visible. The tab control is a really easy way to control this,
because you can use the tab control's OnChange event to assign the
recordsources/rowsources to the subforms/controls on that tab page.

2. don't populate combo boxes until after the user has typed a
couple of characters, and then remove the rowsource when the control
is exited.

3. don't leave forms open in the background, hidden, unless
absolutely necessary.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #6
I have discovered that procedures in a non-split database use less table
handles than the same split database. Just an observation - I don't know
why.

Steve
PC Datasheet
"David W. Fenton" <dX********@bwa y.net.invalid> wrote in message
news:Xn******** *************** ***********@24. 168.128.74...
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in
news:42******** *************** @per-qv1-newsreader-01.iinet.net.au :
The message means that Access is trying to open too many
connections to the database.


No always. When you run out of table handles, you can receive the
same error message.
Access sets aside memory space for 2048 database connections. . .


Uh, you mean table handles here, not connections.
. . . The
kinds of things that use database connections include:

a) Forms and reports (including subforms and subreports): close
any you don't need.


It's not forms or reports that use table handles, its their
*recordsources* .
b) Forms/reports that contains lots of list/combo boxes across the
record.

c) Forms/reports/queries that use the domain aggergate functions,
such as DLookup(), DMax().

d) Code that opens recordsets, and fails to close them and set the
objects to Nothing.

e) Referring to the RecordsetClone of forms (even where you do set
the objects to nothing.

f) Recursive code that opens recordsets.

b, c, and d are the most common culprits.

BTW, if you are using the original Access 97, only 1024 database
connections . . .


Table handles. The error message is erroneous, as it points to the
wrong problem.
. . . were available, so you need to apply SR2.


The key is:

Every dataset and data subset uses a table handle.

A form's recordsource uses a table handle.

Each table or query in the recordsource uses a table handle. Thus, a
SQL recordsource with one table uses TWO table handles.

A query used in a recordsource uses 1 table handle for the query and
one for each table/query it includes. A recordsource with one table
and one query will use a minimum of 4 table handles (1 for the
recordsource, one for the table, one for the query, one for the
table that the query is wrapped around).

Then, as you say, each control with a rowsource uses table handles
in the same way.

Add to that the wrinkle of replication, which keeps a whole host of
replication tables open in the background, unbeknownst to you, and
thus adds a bunch of table handles to the process (perhaps even
doubling the number -- I don't know for certain).

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc

Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
11659
by: Debbie Gilbert | last post by:
When running a report..I get the message "Cannot open any more databases." Run-time error 3048... Has anyone seen this message before?
4
3279
by: Koen | last post by:
Hi all, At work I created a database which is really helpful. The database is used by approx 15 users. Everything worked great, until I added some 'scoreboard' forms and reports. I get the "Cannot open any more databases" error. The 'scoreboard' form show a matrix of 6 columns, 7 rows. Each cell is calculated separate by (what I call...
46
5946
by: Steve | last post by:
Access97 Database The database is split into a frontend and backend and not connected to any other database. The database has an unbound report with 15 subreports. Some of the subreports include Excel charts in unbound object frames. When I add 3 additional subreports, I get the error message that Access can't open any more databases. Can...
1
4925
by: celtic_kiwi | last post by:
I have an Access 97 database, quite large, and have started getting the error, Error 3048: Can't Open any more databases. -The data is split from the application (front end and back end). -The application has a fair bit of VBA -The Data database resides on a network server -Generally there are 3-4 front-ends attached at any one time The...
0
1227
by: Smriti Dev | last post by:
Hi, I am creating a tab form that has some subforms within it as aswell. When I sometimes use the forms, I get a 'cannot open more tables error' I would appreciate your help with this. How can I solve the problem. Also, how can I synchronize my subforms with each other? Thanks,
4
2025
by: carrionk | last post by:
Hi, I'm running a union query (12 unions over the same Object*). I'm getting the following message: "Cannot open anymore databases" * The object is another Query. How can I avoid this problem? Thanks LC
0
1631
by: Holly Cross | last post by:
I have a report that uses several subreports. The report looks fine in print preview, but when I send it to the printer, I keep getting this message "Cannot open any more databases." This happened when I add the last subreport. Is there a limit on the amount of subreports you can call from a report? If so, any work-arounds? There is a little...
0
1494
by: bhipwell via AccessMonster.com | last post by:
I am getting the 3048 error: "Cannot open any more databases." I have a couple forms loaded with tabs covered in combo boxes, list boxes, etc. The error occurs when running a form with 12 subforms on it. The form and subforms all reference the same table (they are separate forms so I can use the visibilty function to move data vertically...
2
7160
n8kindt
by: n8kindt | last post by:
i'm stuck. i'm using access 2007 on a windows vista machine (i've tried running on xp too, though--same result) and this is the error i keep getting whenever i try running my main query: Cannot open any more databases. (Error 3048) You have reached the limit on the number of databases that can be opened at one time. Close one or more...
0
7437
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7463
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7797
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3493
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3473
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1923
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
748
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.