Adjusting Column Widths

aziz rasul

Active member
Local time
Today, 13:42
Joined
Jun 26, 2000
Messages
1,935
Is there any code that I can use which will open a table and automatically adjust the column widths (much like you can do in MS Excel) and then close the table?
 
You can read and set the column width of a field in a table using the following property value in a sub or function:

CurrentDb.TableDefs("tablename").Fields("fieldname").Properties("ColumnWidth").value

However there is no AutoSize method - you would need to know the widths you want in advance, with -1 being the default, and positive numbers actual widths.
 
the thing is, that you dont really want to be looking at tables directly - far better to use queries or forms to read the tables
 

Users who are viewing this thread

Back
Top Bottom