Error 3048 and Form tabs

J

jas580

I am getting the "Error 3048, Can't open anymore databases" when I use a sort
function on a specific popup form. I've been reading up on causes of this
and I'm wondering if using too many tabs in forms/subforms would cause this
as well. I have 5 tabs on my main form and subform tabs within each of
those. I also have buttons for popup forms that contain tabs. So, I got a
lot of tabs.

I also figured out that if I open my main form, don't click anything, then
open the popup from outside the user from, it works properly. But when
opened from within, after clicking around a little, I get the error. So, it
seems things are opening but not closing with my current setup.

Please advise...

Thanks!

Jeff
 
J

Jeanette Cunningham

Jeff,
when this tabbed form is open, do all the subforms load and are there a lot
of combos/listboxes that load up their rowsources?
This can use up many databases.
One thing to try is to set up combos/listboxes so that they only load up
their rowsource when a user enters them.
You can do this with either the got focus or enter events.
You can open the form with empty subform controls and only load the source
object for a particular subform when you open that page of the tab control.


Jeanette Cunningham -- Melbourne Victoria Australia
 
J

jas580

Jeanette, thanks for the advice. Your assumptions are correct- I have
several combo boxes and many nested tabs. I would love to know how to
implement your suggestion of loading/unloading controls based on what tab is
active. Can you please explain? I'm pretty amateur with coding.

Thanks,

Jeff
 
J

Jeanette Cunningham

Jeff,
here's how to do it with a combo.
in design view of the form, click on the combo to select it, and open the
property dialog if it's not already open.
On the data tab, take a note of the query - copy and paste it into word or
similar.
Then delete the row source for the combo.
Move to the Events tab of the property dialog.
Go down to the list and find On Enter.
Click the button with the ellipsis(...) and choose Code builder, then OK.

The code window will open ready to put in the rowsource for the combo.
The code needs to look something like this:

Private Sub ComboName_Enter()
Me.ComboName = "a"
End Sub

Replace the letter 'a' in "a" with the rowsource you copied and pasted into
word.
Save and compile the code.
Open the form normally test this combo to see if it works correctly.
If not correct any errors.
Repeat for the next combo, . . . .


Jeanette Cunningham -- Melbourne Victoria Australia
 
J

Jeanette Cunningham

ps

Previous reply was in too much of a hurry.

replace
Private Sub ComboName_Enter()
Me.ComboName = "a"
End Sub

with
Private Sub ComboName_Enter()
Me.ComboName.RowSource = "a"
End Sub

Use the real name of your combo instead of ComboName


Jeanette Cunningham -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top