speakers_86
Registered User.
- Local time
- Today, 03:39
- Joined
- May 17, 2007
- Messages
- 1,919
I have a datasheet subform anchored to the bottom right. I want the columns in it to stretch across the whole subform. Am I able to do this? The line that is printed is:
8580 8579
but there is still plenty of room left in the subform.
8580 8579
but there is still plenty of room left in the subform.
Code:
Private Sub Form_Load()
Me.MissionID.ColumnHidden = True
Me.TerminalID.ColumnHidden = True
Me.txtView.ColumnWidth = -2
Me.Search.ColumnWidth = -2
Dim lngW As Long
lngW = Me.Parent.frmShiftBriefMissions.Width
Me.FriendlyName.ColumnWidth = 0.4 * (lngW - Me.txtView.ColumnWidth - Me.Search.ColumnWidth)
Me.Terminal.ColumnWidth = 0.2 * (lngW - Me.txtView.ColumnWidth - Me.Search.ColumnWidth)
Me.cboRx.ColumnWidth = 0.2 * (lngW - Me.txtView.ColumnWidth - Me.Search.ColumnWidth)
Me.cboTx.ColumnWidth = 0.2 * (lngW - Me.txtView.ColumnWidth - Me.Search.ColumnWidth)
Debug.Print lngW & " " & Me.txtView.ColumnWidth + Me.Search.ColumnWidth + Me.FriendlyName.ColumnWidth + Me.Terminal.ColumnWidth + Me.cboRx.ColumnWidth + Me.cboTx.ColumnWidth
'AutoWidth Me
End Sub