Hide default Add New Record Button ONLY - How? (1 Viewer)

Local time
Today, 04:37
Joined
Feb 28, 2023
Messages
628
More updates - I think this will be simple ...

First off, I tried adding Me.Move Me.WindowLeft and the API call to my subform in the Enable/Disable Buttons() subroutine, which is called from the FormCurrent() procedure of my main form. It doesn't work.

There is a glitch where when I disabled the form Navigation buttons, I still saw the space for the scrollbar but the code here fixed that issue:

Now, I am using a rectangle to make my navigation form appear to be a "bar" rather than a control.

If the form is wider than the screen, it works fine except the buttons scroll:
1705928940967.png


1705929020067.png


However, if the form is smaller than the screen - no scrollbar needed, I get this:
1705929157851.png

Questions:
  • First, is there any way to "extend" the rectangle? Right now, it stops at the border of the form. If I make it longer, it increases the form width - i.e. the form is roughly 16-inches. If I make the rectangle stop at 18-inches, the form size increases to 18-inches and I will end up having to scroll the form just to see the end of the rectangle. (i.e. is there any way to set the rectangle width to the form width, regardless of display resolution.
  • Second - is there any way to center the navigation subform in the window footer? If I do this, the scroll setting will not matter - i.e. If I move the navigation subform over 3 inches, it means the buttons likely won't move offscreen, but at VERY low resolution, they might be off to the right of the screen.
Thanks and regards!
 
Local time
Today, 04:37
Joined
Feb 28, 2023
Messages
628
Somewhat solved - If I put the following code in Form Resize, it fixes the gap:
Me.zz_frmNavButtons.Width = Me.InsideWidth
Does NOT work if I resize the form, but works if I open it with Access sized down or with Access Maximized. I might move it to Form Current of some other procedure.

I no longer need the rectangle in the footer.

I can "fake" question two by adding a couple of inches to the left of the zzfrmNavButtons - won't stay centered and won't be perfect, but should keep the buttons on-screeen.
 
Local time
Today, 04:37
Joined
Feb 28, 2023
Messages
628
Current status - Moved the width setting to Form Open code, added 6-inches of space before the nav form.

Is not centered and still gives a gap if I open full-screen and size down, but works fine if I open the form sized down or if I open maximized.
Maximized:
1705931601477.png

Reduced down and scrolled left:
1705931698606.png

Reduced down and scrolled right:
1705931755478.png
 
Last edited:
Local time
Today, 04:37
Joined
Feb 28, 2023
Messages
628
Made a slight change to the form and can't get it quite working correctly.

I wanted the navigation indicators centered in the bottom of the form.

I backed out the 6-inches of spacing on the left and set the form width to 3.05 inches.

Then I added this code, which is working (in Form Open, but I also tried it in Form Current):
Me.zz_frmNavButtons.left = (Me.InsideWidth / 2) - (1.525 * 1440)

Now, I wanted it to look like a statusbar, so I added a rectangle of the same size and color and called it FooterBanner.

I added this code:
Me.FooterBanner.left = 0
Me.FooterBanner.Width = Me.InsideWidth
Me.zz_frmNavButtons.left = (Me.InsideWidth / 2) - (1.525 * 1440)

It is working if I don't need to scroll, but not if I do:
No Scrolling:
1705948343535.png

Scrolling - note gap on right:
1705948428464.png

Any idea what I need to change to fix it?
 
Local time
Today, 04:37
Joined
Feb 28, 2023
Messages
628
This doesn't work either - and seems to leave the same amount of blank space:
Me.FooterBanner.left = 0
Me.FooterBanner.Width = (Me.InsideWidth / 2) - (1.525 * 1440)
Me.zz_frmNavButtons.left = (Me.InsideWidth / 2) - (1.525 * 1440)
Me.zz_frmNavButtons.Width = (Me.InsideWidth / 2) + (1.525 * 1440)

Also, I think it is clear, but ...
First code is supposed to put the left edge of the navigation form at the center of the window, minus 1/2 the width of the navigation form. FooterBanner is supposed to be the entire width of the window.

Second code is supposed to put the left edge of the navigation form at the same location, but change the width of the navigation bar to 1/2 the width of the navigation form, plus 1/2 the width of the window, which should take it to the right edge. The footer banner should go to the start of the navigation form, which it does.
 
Local time
Today, 04:37
Joined
Feb 28, 2023
Messages
628
Also - Reply #43 is incorrect, but I don't understand what is happening.

One of the form's works the way I want - the navigation panel seems to take up the entire screen regardless of what the size of the window is. My other forms, which are not the same size, have the gap on the right if the form is wider than the window size, but it doesn't matter which from I open first and the startup code is the same.
 
Local time
Today, 04:37
Joined
Feb 28, 2023
Messages
628
Posting a demo database. Two things I noticed, but I'm not sure if they cause the problem. In some cases, my FooterBanner rectangle kept the form width, so, if my form was 16.5-inches wide, the FooterBanner would increase to 16.5-inches, and a later form, which would have been 15.8 inches, would now be 16.5-inches wide to accommodate the FooterBanner width, but I'm not sure that is the only error.
 

Attachments

  • NavButtons Demo.accdb
    768 KB · Views: 31

Users who are viewing this thread

Top Bottom