0
votes

So I've recently upgraded from Access 2003 to Access 2016 and of course, I hate having to deal with the obnoxious white background that can not be changed in 2016. Maximizing forms/reports is not an option for us as we oftentimes will be using multiple forms/reports at any given time and need to be able to view and change between them to do our job.

I've come up with what I think is a pretty smart solution, I created a background form that is empty except that it has a dark gray background to make it easier on your eyes. When you open a new form or report (On Open Event), it then places that form on top of a stack so that you have a hierarchy of open forms and reports.

Should you click on a form or report that isn't on top (On Activate Event), then it gets moved back to the top of the stack. Then should you accidentally click on the background form, instead of covering up everything you've been working on, it goes through the stack, starting at the bottom and setting focus to each form or report in order. Here's how I do it for those of you interested:

Private Sub Form_GotFocus()
  Dim db As DAO.Database
  Dim rst As DAO.Recordset
  Set db = CurrentDb
  Set rst = db.OpenRecordset("SELECT ID, FormName, FrmRpt FROM FormStack ORDER BY ID", dbOpenSnapshot)
  If rst.EOF Then
    DoCmd.OpenForm "frmMenu"
  Else
    While Not rst.EOF
      If rst.Fields("FrmRpt") = "Form" Then
        Forms(rst.Fields("FormName")).SetFocus
      Else
        DoCmd.SelectObject acReport, rst.Fields("FormName")
      End If
      rst.MoveNext
    Wend
  End If
  rst.Close
  Set rst = Nothing
End Sub

This is all working perfectly, I just need to make sure I add the code to any new forms or reports that I create.

So here is my dilemma, this background form needs to be big enough to fill the screen of whoever is using it, otherwise, you would see white around the edges. Since everyone has different monitors I decided to make the form extremely large (21"x13") so that it would fill the screen of anyone who is using it. I have Auto Center, Auto Resize, and Fit To Screen all set to yes.

I have No border, record selectors, navigation buttons, diving lines, scroll bars, control boxes, close buttons, or min-max buttons, and it also is not moveable. The Detail section can grow and can shrink. So now everything is working, except since this form is bigger than anyone's Access window, there are now scroll bars on the Access window itself so that you can move around to see the whole background form in all of its drab, dark gray glory.

It would be great if it could be fit to fill the Access window perfectly so that these scroll bars won't appear and confuse users.

Does anyone know how to solve this problem?

4
Not sure I understand your situation. Wouldn't making all forms/reports Popup = Yes solve all your issues? You could then make the Access window very small.Andre
Can't you just maximise that background form?Gustav
That is a cool idea, I had never used Popup before, however it doesn't really work for our needs. For one we have a custom menu bar (now part of Add-ins) that we need to have available at all times. I also feel like having a smaller window in the corner of the screen is something that will be very confusing to some of our older employees. Quite honestly, I'd rather live with the scroll bars if there is no way of resizing the background form.Ben Tolsky
Maximizing does not work, if you maximize one form or report, then all other open forms and reports are maximized, including new forms and reports as you open them. As a result it is very difficult to navigate between them.Ben Tolsky
Perhaps this trick : maximize any form, get the values of <code>Me.WindowHeight and Me.WindowWidth</code>, restore back to whatever you desire, and use the captured values to change the size of your background form.JonRo

4 Answers

1
votes

Go to Access settings=> document window options and select tabbed documents. Any form you want to have specific size, you can then set as "popup".

You can still have your custom form with custom bg colour, size 1cmx1cm, no scroll, no navigation bar, no record selctor, borderstyle none. Place a rectangle and set the Anchoring property to "strech down and across" that'll fill the whole access app and user won't be able to close it.

settings page

enter image description here

sample result

enter image description here

0
votes

I would

  • Maximize the background form to cover the Access background.
  • Set all Forms+Reports to Popup = Yes, then they won't be maximized, even if a maximized form is open.
  • Educate the users that they now have more freedom where to move the windows, and that they should avoid covering the menu bar.
    If some of them have a two-monitor setup, they can also move some windows to the 2nd monitor (outside the Access main window). This can be very useful.
  • (And most importantly) do away with all this code in all forms.
0
votes

Late answer, but best solution I've found is Shrinker-Stretcher over at Peter's Software. It cycles through all controls and resizes everything on a form (and its subforms) to fit the application window. Developer's license is reasonable for what it does.

0
votes

Well this doesn't resize a form to fit the screen, but Access now has a Dark Gray theme which gives me a dark background and solves my problem.