Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access error cannot open any more databases 1

Status
Not open for further replies.

aaabuhalime

Instructor
Nov 22, 2012
67
US
Hi,
I have created a form that icludes two subforms, when I try to open the form I get the ollwing error "Access error cannot open any more databases" any suggestion on how to solvethis error.

Thanks
 
Dhookom,
I have comboboxes in the main form and in the subforms, one of the comboboxes
On the main form has code to specify selections, what can I do in this case to solve this issue? Many thanks in advance
 
As Duane points out all of those things make a connection to the database. Normally this requires quite a lot of connections. Assume a form with 20 comboboxes, that is 20 connections to the database. So without having all the details about your form and subform the normal solution is to simplify. Break the form up, have pop up forms. Ensure there is no other code that is holding persistent connections like global recordsets.
 
Majp,
Thank you very much, do you mean making the subforms pop up forms?
Thanks
 
If this is really the case where you have too many connections then you will have to simplify the form by reconsidering the design. Sometimes Access gives some general error messages that are not what you expect. But if this is an overly complicated form with lots of connections then you are going to have to simplify. What happens if you remove one of the Subforms? Do you still get the error? What happens when you remove the other subform? Pop up forms may/may not be a viable interface.

Provide some details on the form and how you use it. Provide info on the subforms. Describe the types and number of controls. Maybe there is a simpler design we can suggest that can still meet the user needs.
 
Hi,
Thank you very much for your help, I changed the design of the form and it works fine, I have created buttons instead of having tabs, and merged the similar forms into one form under one tab, the question now , I have a button that opens the form with record I want, I have created a button to go to new record for data entry (bring clear/blank from), the only thing that I have trying to do is I want to reserve the Id, every time when I add new record I want the ID to poulate automatically, for some reason it is not working , here the code I used;
Code:
Private Sub Command213_Click()
Dim strDocName As String
 Dim strWhere As String
 strDocName = "frmVisit_Test"
 strWhere = "[ParticipantID] = """ & Me.[ParticipantID] & """"
 DoCmd.OpenForm strDocName, , , strWhere, acFormAdd
End Sub

Any help will be appreciated.

Thanks
 
...
DoCmd.OpenForm strDocName, , , strWhere, acFormAdd
DoEvents
Forms(strDocName).Controls("ParticipantID").Value = Me!ParticipantID

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top