Code Samples for Businesses, Schools & Developers

First Published 24 June 2023             Last Updated 23 Feb 2024


Periodically, posts appear on various forums where users have lost the property sheet and are unable to retrieve it. For example:
      Property Sheet Does Not Display by mredmond13 (June 2018)
      Property Sheet Does Not Show by valeryk2000 (June 2023)



The Access property sheet is displayed when you click Property Sheet on the Form Design or Report Design ribbon.
By default, it is docked on the right side of the screen.

PropertySheet1Right
However, if preferred, it can be docked on the left of the screen or made to float

PropertySheet2Floating
It can also be resized and in extreme cases, shrunk to almost nothing

PropertySheet3Shrunk
It is also possible to move it completely off the top or bottom of the screen or onto the desktop on a different monitor.

It will retain the latest setting until moved again.

Occasionally this can cause issues where someone forgets the property sheet location.

Possible solutions:

  •   try pulling the right edge of your form to the left to make space for the property sheet
  •   if you have hidden the application interface, try restoring the ribbon and navigation pane
  •   try changing the resolution temporarily, then change it back. That usually fixes the issue
  •   use VBA code to reset the position – this ALWAYS works

The following code suggested by Josef Poetzl has been reproduced with his permission:

Sub FindPropertySheet()

'find the current position and setting for the property sheet
      With Application.CommandBars("Property Sheet")
            Debug.Print .Name
            Debug.Print "Top, Left, Width, Height:", .top, .left, .Width, .Height
            Debug.Print "current position:", .Position
      End With

End Sub



Example output:

Immediate1
In this case, the property sheet is on a secondary monitor (Left <0) and is floating (Current Position = 4)

The allowed msoBarPosition values are:
  •   msoBarLeft = 0
  •   msoBarRight = 2
  •   msoBarFloating = 4

So to reset the property sheet to the right of the screen, you just need one line of code:

Application.CommandBars("Property Sheet").Position = msoBarRight


NOTE:
Using the msoBarRight expression requires the reference library Microsoft Office xx.0 Object Library.
However you can use its value (2) without first setting the reference.

Application.CommandBars("Property Sheet").Position = 2


After running that code line, the previous code will show something like this

Immediate2


UPDATE 23 Feb 2024

The above code fails with error 5 if the property sheet hasn't been opened in the current session

Error5
However, this is easily fixed as the 'property sheet' command bar is the first in the list with index = 1. Replace the above code as follows:

Sub FindPropertySheet()

'find the current position and setting for the property sheet
      With Application.CommandBars(1)
            Debug.Print .Name
            Debug.Print "Top, Left, Width, Height:", .top, .left, .Width, .Height
            Debug.Print "current position:", .Position
      End With

End Sub


Or just type the following in the immediate window to set the property sheet position to the right

Application.CommandBars(1).Position = 2


NOTE: The alternative code using the index value also works in other Office languages whereas the command bar name is language specific



Feedback

I would be grateful for any feedback on this article including details of any errors or omissions

If you have any comments or questions, please contact me using the feedback form below to send me an email



Colin Riddington           Mendip Data Systems                 Last Updated 23 Feb 2024



Return to Code Samples Page




Return to Top