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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

...can't create any more controls on this form 1

Status
Not open for further replies.

boggg1

Programmer
Oct 17, 2002
102
EU
Trying to add a radio button to my form I get...

...can't create any more controls on this form.
If you have deleted controls from this form or report in the past, you may be able to rename the form or report and then add more controls to it

I backed up my database and renamed the form and that's broken something which I cannot find. I'm sure I can fix this if I try hard enough but even now trying to add my radio button I still get the same error. So there's no point in trying to find what I broke by the rename.

Is there anything else I can do to get more controls on my form or have I hit some limit ?

Boggg1
[bigglasses]
 
Wellll. . . the obvious question is: how many controls DO you have on the form?

VBAjedi [swords]
 
Did a quick count and I got 249 but I wouldn't guarantee that's exact. The presence of a tab control makes it possible to jam this much in. A lot of these are just labels of course.

I'm only 1 year into VBA and I'm using VBA through Access and I have no contact with other programmers. Is this a lot of controls ?

Boggg1
[bigglasses]
 
Yup, that's a lot of controls. Apply the stuff in the thread Jeff pointed you to, and you should be on your way. . .

VBAjedi [swords]
 
Hi,

Do all the controls need to be visible?

A technique that I use on Sheet Controls is, for instance, to have ONE Combobox that becomes VISIBLE in the context of what the user is doing, like selecting a cell in a particular column. In addition, it is positioned and sized dymanically according to the context. The List and other processing is dynamically changed releative to the context. So one column might be a ComboBox with a list of Products, while another column might be a ComboBox with a list of Destinations. It's all done with ONE COMBOBOX.

Just food for thought :)

Skip,
Skip@TheOfficeExperts.com
 
The master has spoken. Let's all take a moment to reflect on the wisdom of his words. . .

J/K

Good suggestion, Skip! Have a star from me (and it ain't even my problem!). Even if he uses a handful of labels (how many can you see at once, anyway?), populated dynamically with the correct values, he will avoid the number of objects issue. . .

VBAjedi [swords]
 
Thanks for the advice. The basic technique of copying the form does indeed allow more controls (presumably it resets some counters) as explained by VBAjedi and jeffmoore. However, I chose to do it another way...

I copied my StartUpForm to NewStartUpForm
I changed all references in my code to NewStartUpForm
I set NewStartUpForm as the startup form
I Compacted/Repaired my project

NewStartUpForm is now the form in use so you can delete the original form (StartUpForm) and Compact/Repair.

Thanks guys.

Boggg1
[bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top