Scrolling a tab page (1 Viewer)

CivilUser

Registered User.
Local time
Yesterday, 20:02
Joined
Jul 28, 2011
Messages
14
Is it possible to have scrolling capability within a tab page on a form?

Currently I have a form with tab control. There are 7 tabs and the 7th tab has a long list of check boxes that wont fit inside the area I set aside for the tab control box. When I place the check boxes into the tab page, the page automatically re-sizes to contain all the new check-boxes. I am not able to re-size the tab page. Are there any settings that will allow me to re-size the tab page to contain all the check-boxes and scroll to view them all?

It seems like it should be easy and straightforward... right?
 

missinglinq

AWF VIP
Local time
Yesterday, 23:02
Joined
Jun 20, 2003
Messages
6,423
Is it possible to have scrolling capability within a tab page on a form?
No.
...the 7th tab has a long list of check boxes that wont fit inside the area I set aside for the tab control box.
Then you need to increase the size of the entire Tabbed Control.
...When I place the check boxes into the tab page, the page automatically re-sizes to contain all the new check-boxes.

...I am not able to re-size the tab page...

...Are there any settings that will allow me to re-size the tab page to contain all the check-boxes
So which is it? The page is automatically resizing or you can't get it to resize? Logic dictates that it can't be both!
...It seems like it should be easy and straightforward... right?
Obviously not! :D

What you can do, as a workaround, is to create a Form with your Checkboxes on it, then place a Subform Control on your 7th Page of the Tabbed Control and use this new Form as the Source Object for the Subform. Access will then give you Horizontal Scroll Bars for the Subform.

But why not simply add another Page to the Tabbed Control? Making users scroll to in order to get to all parts of a Form, especially for Data Entry, is one of the most user-unfriendly things a developer can do!

Also note that in using a Subform, you will require different syntax in order to refer to the Checkbox Controls on the Subform.

Linq ;0)>
 

CivilUser

Registered User.
Local time
Yesterday, 20:02
Joined
Jul 28, 2011
Messages
14
Thanks Linq. That is a clever workaround. I will see what I can put together. I am a little confused at how to combine the two forms so that they update a single record simultaneously. Hopefully that will be clear when I get there. I will let you know how it goes.
 

CivilUser

Registered User.
Local time
Yesterday, 20:02
Joined
Jul 28, 2011
Messages
14
It works great! I created a query that looks up a record ID from the main form. The query is then used to populate the subform which was placed on a tab page of the main form. And the best part is that it scrolls just like I envisioned. Thanks Linq.
 

philbullock1223

Registered User.
Local time
Yesterday, 22:02
Joined
Dec 31, 2011
Messages
55
Any chance you have an example of this? I am having the same issue, however, I am having a problem with the subform and form acting simultaneously when I want to create a new record.

When I create a new record, the subform and form seem to be acting on different records.

Phil
 

CivilUser

Registered User.
Local time
Yesterday, 20:02
Joined
Jul 28, 2011
Messages
14
The main difference between the form and the subform as I see it is that the source for your main form is the actual table you are pulling data from and the source for your subform is a query that looks up certain values from the same table as the main form. But the query needs an index to point to so that it matches up with the main form.

In my case I keep track of specific records by a proposal number. The main form displays the proposal number and my query looks up that proposal number to identify which record I am viewing. Here is an example of my query in design mode:



Notice that under "criteria" for ProposalNumber it reads "[Forms]![frmProposals].[Proposal Number]". This is what tells my subform which record I am viewing. It looks up the proposal number from the main form which is called frmProposals. It only works if frmProposals is open, else it returns a null value. This is the only field that has criteria in the query. Also of note is that I do not have the proposal number "Show" value checked because it is already displayed on the main form.

Let me know if you have any questions. I think it turned out really nice ;). (here is the bottom half of my form).

 

philbullock1223

Registered User.
Local time
Yesterday, 22:02
Joined
Dec 31, 2011
Messages
55
So I implemented the form like you said. I was aware that I could create a query that also ties to the same table and limit the display with Critera.... however, I thought I could "bypass" having to do this by simply linking up the Child and Master Fields.

After implementing the forms in the way you suggest, I am still getting problems with the two forms being on the same record.

If I create a new record and jump into the subform, the subform creates a new record but the main form dosn't recognize it, so when I just back, the main form is still in (new) mode... and if I type information in any field I get two new records (one from the main and one from the sub)....

It was a good thought, and I am getting slightly different results but I still have same overall problem.
 

philbullock1223

Registered User.
Local time
Yesterday, 22:02
Joined
Dec 31, 2011
Messages
55
Attached is my access 2010 example file to which I am having the issues. This example does not implement the Query-type interface, but simply my original attempt.

Phil
 

Attachments

  • Example.accdb
    836 KB · Views: 183

CivilUser

Registered User.
Local time
Yesterday, 20:02
Joined
Jul 28, 2011
Messages
14
I remember having some issues with that. I believe I got around that by performing a requery in vba. For example, the user was forced to enter in a project number first. Once the project number was entered I ran this code:

Code:
Me.Requery
DoCmd.GoToRecord , , acLast

I think this updates the table with the new record (and associated project number) and then the navigates to the last record in the table (which should be the new record). This should be done before entering data into the subform since the subform is looking for a specific record. if the record is not there, then it creates another.

Before I implemented this code I would get similar results to what you described. 2 new records were created. One from the Subform without a proposal number and one from the main form.

I am kind of a newb at this stuff so take my advice with a grain of salt. And if anyone else could add to this or correct me, be my guest.
 

CivilUser

Registered User.
Local time
Yesterday, 20:02
Joined
Jul 28, 2011
Messages
14
I hope this helps. Post your results either way. I would love to learn about it.
 

CivilUser

Registered User.
Local time
Yesterday, 20:02
Joined
Jul 28, 2011
Messages
14
I hadn't seen that you put up example files before I replied. I wasn't able to open them though. I wonder if you are using a different version. I am currently running 2007 Access.
 

philbullock1223

Registered User.
Local time
Yesterday, 22:02
Joined
Dec 31, 2011
Messages
55
Ok... so I have solved it from what I can tell.

All I did was simply initiate the record upon AddNew. In other words, instead of waiting for the user to input the first data in god-knows-where, I just initiated the record for the user on a single field.

This seems to work. Thanks CivilUser for all your help! Truly appreciate everything.

I am using Access 2010.

Phil
 

CivilUser

Registered User.
Local time
Yesterday, 20:02
Joined
Jul 28, 2011
Messages
14
Glad you found it. Sounds like it was a similar concept and solution but much simpler than mine. Ill keep that in mind for next time.
 

Users who are viewing this thread

Top Bottom