R
Rob
Hi all,
I have been trying to get a bit of code together to automatically resize the
columns of a datasheet in a subform. After some research I found the
ColumnWidth property and can now programatically change the size of the
columns. The issue is that they are too wide as I cannot account for the
size of the record selector. I have played with a constant, but I would like
it to be dynamic. Could anybody offer any suggestions as to how to measure
the width of the record selector?
I have included my current code snippet.
Cheers
Rob
---------------------------------------------------------------------
Private Sub Form_Resize()
Me.txtTaskID.ColumnWidth = -2 ' Best fit
Me.txtStatus.ColumnWidth = -2
Me.txtTaskTitle.ColumnWidth = Me.InsideWidth - Me.txtTaskID.ColumnWidth -
Me.txtStatus.ColumnWidth ' - width of record selector?
End Sub
I have been trying to get a bit of code together to automatically resize the
columns of a datasheet in a subform. After some research I found the
ColumnWidth property and can now programatically change the size of the
columns. The issue is that they are too wide as I cannot account for the
size of the record selector. I have played with a constant, but I would like
it to be dynamic. Could anybody offer any suggestions as to how to measure
the width of the record selector?
I have included my current code snippet.
Cheers
Rob
---------------------------------------------------------------------
Private Sub Form_Resize()
Me.txtTaskID.ColumnWidth = -2 ' Best fit
Me.txtStatus.ColumnWidth = -2
Me.txtTaskTitle.ColumnWidth = Me.InsideWidth - Me.txtTaskID.ColumnWidth -
Me.txtStatus.ColumnWidth ' - width of record selector?
End Sub