RowHeight, ColumnWidth Properties Example
The following example changes the row height in Datasheet view of the Customers table to display two lines of data (450 twips) and sets the width of the Address column to 1.5 inches (2160 twips). These property settings will take effect the next time the Customers table is opened in Datasheet view.
To set the RowHeight and ColumnWidth properties, the example uses the SetTableProperty procedure, which is shown in the example for the DatasheetFontItalic and DatasheetFontUnderline properties, and the SetFieldProperty procedure, which is shown in the example for the ColumnHidden property.
Dim dbs As Object, tdfCustomers As Object
Const DB_Long As Long = 4
Const DB_Integer As Integer = 3
Set dbs = CurrentDb
Set tdfCustomers = dbs![Customers]
SetTableProperty tdfCustomers, "RowHeight", DB_Long, 450
SetFieldProperty tdfCustomers![Address], "ColumnWidth", DB_Integer, 2160
The next example takes effect in Datasheet view of the open Customers form. It sets the row height to 450 twips and sizes the column to fit the size of the visible text.
Forms![Customers].RowHeight = 450
Forms![Customers]![Address].ColumnWidth = -2