Hi I have an Access Database and a simple Change Record Table.
I also have a Form where I have got all the fields in the top half of the screen and a Datasheet View in the Bottom. See below.
I am trying to set the column widths evenly distributed across the entire width of the screen but so far been unsuccessful.
My code is as follows :
Private Sub Form_Load()
Dim currentFormWidth As Integer
currentFormWidth = Me.Width
MsgBox ("Current width of my form is : " & currentFormWidth)
Dim standardColumnWidth As Integer
standardColumnWidth = currentFormWidth / 13 ' Columns of Data to display
Me.Target_Date.ColumnWidth = standardColumnWidth
Me.Change_Type.ColumnWidth = standardColumnWidth
Me.FullName.ColumnWidth = standardColumnWidth
Me.CDSID.ColumnWidth = standardColumnWidth
Me.Grade.ColumnWidth = standardColumnWidth
etc...
End Sub
The column widths remain unaltered. I would expect to see columns all fit from let to right within the Datasheet View. I think I am not accessing in the right syntax. I think it shold be something like the following : FormName.SubFormName.Target_Date.ColumnWidth = standardColumnWidth ???
Any guidance would be appreciated. Thanks in advance.