Appearance of a horizontal banner under the form if the "NavigationButtons" property is false and "ScrollBars" is Horizontal Only or Both (1 Viewer)

jackyP

New member
Local time
Today, 08:56
Joined
Sep 26, 2023
Messages
27
Hi,
In a form, if the properties "NavigationButtons" is false and "ScrollBars" is Horizontal Only or Both, we see a horizontal banner under the form after using the Maximize button and decreasing the size of the window until the bar horizontal scroll button appears.

To reproduce the issue:
  • Create a new form by changing the properties: 'NavigationButtons' to false - 'ScrollBars' to Horizontal Only or both.
  • Open the form in Form view.
  • Press the Maximize button on the form.
  • Using the mouse, reduce the size of the window on the screen from the left or right edge to display the horizontal scroll bar of the form.
  • Press the form's Maximize button again to display the form as full as possible on the screen or make the horizontal scroll bar disappear again by increasing its width using the mouse.
After these manipulations, a horizontal gray band appears under the form.
This gray band is also permanently displayed on other forms that do not have navigation buttons.

If you don't make the form's horizontal scrollbar appear when you change its size, this problem does not occur.
If the form navigation buttons are visible, this problem does not occur.

This problem is still present on the latest version 2309 and existed before.

Property
Proprietebandeau.png


banner under the form
bandeau.png


form
FormBandeau.gif


Here is the workaround to the problem in VBA:

Code:
Private Sub Form_Resize()
    ‘Remove scrollbars from form
    me.ScrollBars = 0
   
    'Replaces the form scrollbars
    Me.ScrollBars = 3
End Sub

In the form resize event, I remove the scrollBars (ScrollBars=0) and then display them again (ScrollBars=3).
 
Last edited:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:56
Joined
Feb 28, 2001
Messages
27,186
I suspect that the "actual" width of the form (based on its Design Mode width) is where that transition occurs that kicks in the horizontal scroll bar. If you had something like a vertical line on the right edge of the form, it would probably vanish behind the right-hand window border unless you scrolled the horizontal bar.

When you reduce the width of the form's window to less than the designed width of the form, you get the scroll bars. I think this is WINDOWS behavior, not necessarily Access behavior. (Though I could be wrong about that.) The fact that the form is currently blank is irrelevant. I'm not going to guess as to why the gray bar stays once you restore the width. HOWEVER, as an experiment, when that gray bar appears, you ALSO have vertical bars. Scroll them down and back up again to see if that alters the problem.
 

jackyP

New member
Local time
Today, 08:56
Joined
Sep 26, 2023
Messages
27
I suspect that the "actual" width of the form (based on its Design Mode width) is where that transition occurs that kicks in the horizontal scroll bar. If you had something like a vertical line on the right edge of the form, it would probably vanish behind the right-hand window border unless you scrolled the horizontal bar.

When you reduce the width of the form's window to less than the designed width of the form, you get the scroll bars. I think this is WINDOWS behavior, not necessarily Access behavior. (Though I could be wrong about that.) The fact that the form is currently blank is irrelevant. I'm not going to guess as to why the gray bar stays once you restore the width. HOWEVER, as an experiment, when that gray bar appears, you ALSO have vertical bars. Scroll them down and back up again to see if that alters the problem.

Your explanations regarding the appearance of scrollbars are correct.
The empty form is a form created for testing.
All other forms with the same configuration have the same problem.
I rather believe it is an Access problem.
If the form navigation buttons are visible you do not have this problem.
Moving the vertical bar changes nothing.
The gray bar is positioned in place of the navigation buttons and is therefore not part of a section of the form where the controls are located.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:56
Joined
Feb 28, 2001
Messages
27,186
Specifically, if the vertical bar has no effect, then the gray bar is NOT in the displayed area of the form, because if it were in that area, it would be repainted by scrolling. It is outside of the form's limits.

It might be an Access problem. I can't tell easily since I don't have source kits for Access OR Windows. (MS doesn't offer too many of those, and they ain't cheap.)
 

Users who are viewing this thread

Top Bottom