Access tabbed form: keep focus on the top of the form - ms-access

I created a tabbed form in Microsoft Access. The form has seven tab pages each tab page has a number of subforms. The problem is when I move from tab page to tab page the form opens in the middle of the page and requires scrolling up to see top of the form and the tabs of tabcontrol. From my search, I understand this can happen because the form is extra long. I do not want to resize the form as it has to be that long. I checked the tab order of each tab page and all controls are in the right order. My question is how can I force the focus to be on the top of the form when moving between tab pages?

I found a solution that worked for me. Putting a control at the top of the tab order list does not mean that you will get the focus at the top of the tab page. It seems that Access automatically put the focus on the last created control. What I have done is to create an unbound text box with width and height 0 - to be hidden - and I placed it at the top of my form inside each of the tab page. It is important to check that it is at the bottom of the tab order list in each page, job done!

I had the same problem and found an easy fix to it. I had 4 subforms on one tab page (2 at the top (order nr. 0 and 1) and 2 at the bottom (order nr. 2 and 3)). When moving between tabs and going back to my tab with all the subforms, Access just sets the focus in the middle of the page or, to be more precise, where subforms with order nr. 2,3 are.
After checking a million times the orders, I found this solution:
Select the subforms that are at the bottom (in my case the subforms with order nr. 2 and 3)
2.Go to properties > Other > change "In Order" to "No".

Related

Push Buttons and Tabbed Canvas

I Have made a form which contains only a tabbed Canvas with three tabs each tab has one data block, I Have also one button which is the Exit button that belongs to one tab (It's not optional from what I see, I have to make the button belongs to one of the three tabs or more specifically to one of the three data blocks).
My problem is that the button will not be displayed when I run the form Unless I Do something with the tab that it belongs to.
But I want it to be displayed unconditionally.
Is there any way to make the button belongs to the Empty Content Canvas
instead of the tab canvas??
I Figured it out, Indeed the button should belongs to a data block, so I made an empty new block inside the Content Canvas and made the button belongs to it.

Hide tabs within a tabbed control in Access

I have two tabs in my tabbed control and want to hide the tabs / tab names at the top of it as I want users to access the each tab using dedicated sidebar buttons (which I have created and which work).
Is it possible to hide the tabs at the top of the form?
The default Format > Style = "Tabs". If you set this to "None" the tabs row will not appear.
Alternatively, have oyu considered using a Navigation form?
You can set the TabFixedHeight property to something very small, like 0.001 cm.
This works for me in Access 2010 with UseTheme = True.

Is there a programatic way to deal with subform / scrollbar situations in MS Access?

SHORT DESCRIPTION: I need to see all the columns in a datasheet subform. Specifically - 12 columns of months. To do that, I need a horizontal scroll bar. To get to that scroll bar is a challenge. I am developing in MS Access 2007.
THOROUGH DESCRIPTION:
I have a subform 'frm_SP' which displays in datasheet view that is 22" wide which is limit in width for a form - it is nested in another subform called 'frm_stage'.
I finally discovered that no matter how wide I make the very top "Parent form - 'frm_Entry' I can't seem to make ALL of this 3rd nested subform 'frm_SP' visible. The horizontal bar at the bottom just seems to compensate by proportionately growing to keep the limitation intact - this is frustrating.
As you can see in this image below, I have to scroll down to see the horizontal scroll bar. Why is it so far down? Did I specify that somewhere? It keeps that distance no matter how many records exist in the datasheet. So if it only had 4 records, I'd still have to scroll all the way down to see the scroll bar.
Similarly, I have a set of records that go beyond the horizontal scroll bar and I have no way of making the window large enough to see those records. So I have had to tell the client to open the actual table if they need to edit those records.
I have hesitated to post anything like this because it requires images, but now that I have done the work, hopefully this can solve a lot of issues for other users. Maybe this is the reason that there aren't many answers on the web that I can find.
Any tips, suggestions for alternate methods are welcome.
I added "SendKeys" code for the arrow keys so that that the 12 boxes would function more like a spreadsheet.
But I don't understand why January is skipped and then it continues to skip every 2 boxes
Here is the code:
Private Sub txtDEC_NC_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 40 'down
SendKeys "{TAB}", False
Case 38 'up
SendKeys "+{TAB}", False
End Select
End Sub
If you haven't already, try increasing the size of your 2nd-level form (as well as the subform control on that 2nd-level, which houses the bottom level form).
It looks like your bottom level form (with a max width of 22") requires a horizontal scroll bar in order to display within your 2nd-level form. This causes the scroll bar to appear within your 2nd-level form (where you have to scroll-- within the top form-- down in order to see it).
Instead, you probably would prefer that scroll bar to appear on your top-level form, which I believe you will get if your 2nd-level form (and the subform control for your bottom-level form) are also set to a max-width of 22".
The bottom level form will then display within the middle form without the need for a middle-form scroll bar, and the one (and only) scroll bar will render on the top form, where it will always be easily accessible without the need to scroll down first.
I have some thoughts on what causes the extra vertical white space in your second form, but I wonder if the above might not solve your problem.
Just a thought. (And I realize that this is a very old question, so perhaps you no longer need any suggestions here--in that case, I'll just leave this comment for others who may have a similar issue in the future).

How to display the left side of a continuous form with a scrollbar at opening

I have continuous forms made of a header section and a detail section. Controls in detail section are bound to a recordset, while the ones in the header are not bound.
At opening time, focus is made on the first (left) control of the detail section or, if the recordset is empty, first (left) control of the header section. In such a situation, and for forms that need an horizontal scrollbar, the scrollbar will be set to the right side of the form, and left-side info wil be hidden, confusing the user.
Any way to make sure that, in all case, my form will open with its left side visible?
Thanks
Usually to avoid focus discrepancies, I use a small transparent button that I just call btDeadFocus in the header -or the detail section- of my forms.
This invisible button doesn't actually do anything more than capturing the focus. I just make sure that this button is set it as the first control on the form using the tab order list.
The button also becomes useful in situations where the focus cannot be kept on a control. For instance a control that needs to be disabled. I just move it to the btDeadFocus instead.

MS Access scrollbar on subform continuous forms not setting record focus

I can't seem to figure this out. I have a subform displaying continuous forms with a vertical scrollbar. When I click the scrollbar to move to a different record, the record never receives focus. The focus is still on the control of the record I left.
How to I control the record focus after using the scrollbar? The subform's On Current event does not fire.
Thanks!
The vertical scroll bar in a continuous MS Access form does not navigate among records. It simply changes which records are visible on the form. The black triangle within the record selector on the left side of the form indicates which record is currently "selected."
You can navigate records (ie, control the record focus, as you say) several different ways:
Click on the record selector* (the gray rectangle to the left of the form detail section)
Click on any enabled control within the form detail section
Use the navigation controls* at the bottom left of the form
Use [Tab], [Enter], or arrow keys to move through the individual controls on the form detail section; when you reach the last control in the tab order, your next [Tab]/[Enter]/[Down Arrow] key press will take you to the next record
* Note that both the Record Selectors and Navigation Buttons may be turned off on your form. On the form property sheet, ensure Record Selectors: Yes and Navigation Buttons: Yes.