Having got this far, I may as well provide a few more details.
There are actually 3 different form width measurements - all measured in TWIPS:
1. WindowWidth = total width of the window containing a form - including borders.
2. InsideWidth = inside width of a form including the scroll bars and the record selectors
3. Width = interior dimensions of a form, excluding the scroll bars and the record selectors.
See e.g. https://docs.microsoft.com/en-us/off...rm.insidewidth
To illustrate the differences I created a simple form 10cm wide (5670 twips) with no record selectors & no scrollbars
I then added this code to the Form_Load event:
Code:
Private Sub Form_Load()
Dim bytBorderStyle As Byte
Dim strText As String
bytBorderStyle = Me.BorderStyle
strText = vbCrLf & "Border Style = " & Switch(bytBorderStyle = 0, "None", bytBorderStyle = 1, "Thin", bytBorderStyle = 2, "Sizable", bytBorderStyle = 3, "Dialog")
strText = strText & vbCrLf & "========================="
strText = strText & vbCrLf & "Form Window Width = " & Me.WindowWidth
strText = strText & vbCrLf & "Inside Width = " & Me.InsideWidth
strText = strText & vbCrLf & "Form Width = " & Me.Width
strText = strText & vbCrLf & vbCrLf & "Left/Right Border Width = " & (Me.WindowWidth - Me.InsideWidth) / 2
strText = strText & vbCrLf & "Record Select0r Width = " & Me.InsideWidth - Me.Width
Debug.Print strText
End Sub
I then toggled through the 4 border styles and got these results in the immediate window
Code:
Border Style = None
=========================
Form Window Width = 5670
InsideWidth = 5670
Width = 5670
Left/Right Border Width = 0
Record Selector Width = 0
Border Style = Thin
=========================
Form Window Width = 5910
InsideWidth = 5670
Width = 5670
Left/Right Border Width = 120
Record Selector Width = 0
Border Style = Sizable
=========================
Form Window Width = 5970
InsideWidth = 5670
Width = 5670
Left/Right Border Width = 150
Record Selector Width = 0
Border Style = Dialog
=========================
Form Window Width = 5910
InsideWidth = 5670
Width = 5670
Left/Right Border Width = 120
Record Selector Width = 0
All those with thin red line borders look identical but the actual widths vary slightly
So the actual figure you need to allow for is NOT 144 - use 120 (thin / dialog) or 150 (sizable) when running Access 16.0 (2016/2019/2021/365)
In earlier versions such as 2010, the border styles look different & the border thickness values may differ
Now repeat with record selectors.
An additional 285 twips is added to the inside width & window width properties but the width property is unchanged (see above)
In other words, the InsideWidth is 285 twips more than the Width e.g.
Code:
Border Style = Sizable
=========================
Form Window Width = 6255
Inside Width = 5955
Form Width = 5670
Left/Right Border Width = 150
Record Selector Width = 285
Finally repeat with a vertical scrollbar and an additional 255 twips is added to the inside width & window width properties
i.e. Scrollbar Width = 255
All of this means that if you need EXACT placement of one form relative to another, you need to allow for each of the properties involved
The screenshot below is from the example app in my article Accurately Move Forms & Controls (isladogs.co.uk) and was done in Access 2010