Limit to number of subforms on main form

  • Thread starter tobesurveyor via AccessMonster.com
  • Start date
T

tobesurveyor via AccessMonster.com

Good day to all,

Is there a limit to the number of subforms that can be requeried on a form at
any given time?

I have a split database, where I have a main form acting as a 5 day calendar
of scheduled tasks for three different people. To complete this on the main
form I made four combo boxes that was linked to my employee table. I have
five text boxes that have been made to display 5 consecutive days based upon
the first text box date. I now have 12 continous subforms each having
criteria to see the values of one of the three combo boxes and one of the
five text boxes.
cmbbox a cmbboxb cmbboxc
cmbboxd
date1 subfrm 1a subfrm 1b subfrm1c
subfrm1d
date2 subfrm2a subfrm2b subfrm2c
subfrm2d
<and so on>

When the form opens the cmbboxa through cmbboxd do not have any employee
asssociate with it due to the fact that I have project managers that oversee
only certain employees and all project managers have access to this common
form.

The problem I am having is that I open this form, I can choose employees
from cmbbox a, cmbboxb, and cmbbox c but when I try and choose from cmbboxd
there are no employees to choose from the drop down box. Thinking this may
need to be requried I hit "Ctrl - F9" and an error message displays, "Can't
Open any more databases".

Am I approching this wrong or am I missing something? Any help would be
greatly appreciated.

Thanks,
CF
 
A

Arvin Meyer [MVP]

I don't think there's a limit (other than totoal number of controls limit)
on subforms, although I've only used up to 6 of them. There is a limit on
the number of levels you can nest them, and that's 3.

Try to use the afterupdate event of the combo or listbox to requery the next
one, rather than requerying everything at the same time. If you do want to
requery them all, do it in code so that you can do it in the right order,
rather that having them wily-nily trying to resolve themselves. Something
like:

Sub lstListBox1_AfterUpdate()
Me.lstListBox2.Requery
Me.cboWhatever.Requery
Me.subfrom1.Requery
Me.subform2.Requery
' ... etc.
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 

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