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!

Cant create any more controls 8

Status
Not open for further replies.

jaanisf

Technical User
Apr 30, 2003
50
LV
When I try to make a control it gives me this error:

"Microsoft Access can't create any more controls on this form or report.
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 tried to rename the form, but it still gives this error when I try to make a control. What should I do? How should I increase the limit of controls in a form?
 
Access allows 255 controls the life of the form. So if you delete controls, it still keeps track of them. Try compacting/repairing the database, which should clear out the old controls.

If this doesn't work then copy your form and paste it as a new name. Then delete your original form and rename your new copied form to what the original was.

Hope this helps..
 
Humble.. is correct IF you don't have 255 controls on the report.

If you do the limit does apply but I would suggest that if it has 255 controls then it may be a bit complicated.

Regards
Warwick
 
Well, thank you for answering but..
I NEED more than 850 controls on this form. So, there's no way, I could make it?

What I'm trying to make is a table with 26 rows and 33 columns. That's 858 labels (controls) :(
The column Col1 goes for room numbers in a hotel. The column Col2 goes for room cathegory, and columns Col3 to Col33 goes for dates of a month. Rows R2 to R26 goes for reservations for the room ColXRowY. When I click on a label ColXRowY a new form opens where I write a guest's name and a number of days he/she will stay. After updating that form, the label ColXRowY turns Red, for example.
So, maybe you got some recommendations, how I could make it differently?
 
I think I understand what you want to do, but it's not what forms are really designed to do. The form I would design would only have 5 fields. One for room number, one for room catagory, one for guest check in date, one for check out date, then one more for the guests name.

Then I would use two tables. The first one would contain a field for room number and another one for room catagory. I am assuming that these values will not change often. The second table would contain the remaining fields plus a foreign key field from the first table for room number.

Next you need to use a many to one relationship to link the two tables together. In the relationship design just click on the room number field in the first table and drag it to the room number field in the second table.

Now in the first table enter all of the room numbers and their catagory types.

I would probably use combo boxes for the room number control on the form. And a locked text box for the catagory type.

Now you need to decide how you want to show which rooms are reserved and which ones aren't. You have many options between querys, reports, or even filters on your form.


If this is to confusing you may want to consider using an excel spreadsheet. It will do what you are trying to do with this form approach alot easier.
 
Well, I had already all these tables and forms you're describing. And it all works just perfect. Only thing I want to make now, is this main form, where I could see all the reservations and all the free rooms too for a whole month.
You mentioned excel spredsheet. Is it possible to import the excel spreadsheet like a subform on that main form? It would easily solve it all, don't you think?
 
If all you need is to see the other information why not put that on two subforms on the main form & apply the rest of Jeff's design?

Regards
Warwick
 
What I meant is design a form to do the booking as per Jeff's design but give yourself the extra information required (Free Rooms, existing bookings) by designing a couple of subforms which can be inserted into the main form.

Regards
Warwick
 
But it's not what I want.
I want this:
|A|B|C|D|E|F|G|H|I|J|K|..
|1|_|_|_|_|_|_|_|_|_|_|..
|2|_|_|_|_|_|_|_|_|_|_|..
|3|_|_|_|_|_|_|_|_|_|_|..
|4|_|_|_|_|_|_|_|_|_|_|..
|5|_|_|_|_|_|_|_|_|_|_|..
|6|_|_|_|_|_|_|_|_|_|_|..
..
B,C,D,.. goes for dates
1,2,3,.. goes for room numbers.
If room 4 is booked for date F, then F4's background is red.
 
Jeff's design is most logical and will be most beneficial in the long run but it appears you do not want to change your design to work this way.

Maybe you should split this up into a couple of different forms. Form1 would have rooms 1 - 50 with a 'Rooms 51 - 100' button that would take you to Form2 with rooms 51 - 100. Form2 would have a 'Rooms 101 - 150' button that would take you to Form3 with the rooms 151 - 200 and so on. This would eliminate your problem with one form having too many controls. You can event put navigation on the bottom of all the forms that allow you to link to any of the forms. Example:
Rooms 1 - 50 | Rooms 51-100 | Rooms 101 - 150 | ect.

Example Forms:

Form 1
|A|B|C|D|E|F|G|H|I|J|K|..
|1|_|_|_|_|_|_|_|_|_|_|..
|2|_|_|_|_|_|_|_|_|_|_|..
|3|_|_|_|_|_|_|_|_|_|_|..
|4|_|_|_|_|_|_|_|_|_|_|..
|5|_|_|_|_|_|_|_|_|_|_|..
|6|_|_|_|_|_|_|_|_|_|_|..
through 50...

Form 2
|A|B|C|D|E|F|G|H|I|J|K|..
|51|_|_|_|_|_|_|_|_|_|_|..
|52|_|_|_|_|_|_|_|_|_|_|..
|53|_|_|_|_|_|_|_|_|_|_|..
|54|_|_|_|_|_|_|_|_|_|_|..
|55|_|_|_|_|_|_|_|_|_|_|..
|56|_|_|_|_|_|_|_|_|_|_|..
through 100..

Form 3
|A|B|C|D|E|F|G|H|I|J|K|..
|101|_|_|_|_|_|_|_|_|_|_|..
|102|_|_|_|_|_|_|_|_|_|_|..
|103|_|_|_|_|_|_|_|_|_|_|..
|104|_|_|_|_|_|_|_|_|_|_|..
|105|_|_|_|_|_|_|_|_|_|_|..
|106|_|_|_|_|_|_|_|_|_|_|..
through 150..
 
I have only 25 rooms ;)) But, when it goes to dates.. ;)
Yes, I know, it works well, when I have it for two weeks.
But, let's close this. The answer to all this, is to use a spreadsheet control inside of a form ;)
 
This was posted inadvertantly in another thread by:

andyukcy (TechnicalUser) thread702-610639


I would like to have the first letter of each day that correspond to each date . Example July 2003
M T W T F S S
21 22 23 24 25 26 27
and would also be nice if i could highlight the column that corresponds to Saturdays and Sundays .. can someone help?I am also trying to add a box called "Notes" in the booking form under the CustomerName. Your help is much appriciated
Andy
=====================================================


Hi Andy, I have made the changes/additions you asked for.

I found S M T W T F S S M etc confusing, so have programmed
Su Mo Tu We Th Fr Sa Su Mo etc. You can change this if you want. In the new function DefineWeekEnds, change the line:

ctl.Caption = Left(Format(datCurrent, "ddd"), 2)
to
ctl.Caption = Left(Format(datCurrent, "ddd"), 1)


Also in the function DefineWeekEnds you can change the colours I've used to best suit your purposes.

Bill

 
excellent piece of work ..
i m trying to modify it to use it to book my appointments (i m a dietitian) and i m changing the "category" to be the time of the appoinment (e.g 14:00-14:30) and the title of room No. to be appointment number ..
Thank you
Andy Cyprus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top