ColumnWidth

D

DS

The column width thing isn't working...its on a ListBox
It says Type Mismatch and ColumnWidth is highlighted
'ID
Me.TxtStatus = "Select By ID"
With Me.ListEmployees
.RowSource = "SELECT Employees.EmployeeID " & _
"FROM Employees " & _
"ORDER BY Employees.EmployeeID;"
.ColumnCount = 1
.ColumnWidth = "1 in"
.Requery
End With
Any help appreciated.
Thanks
DS
 
R

Randy Harris

DS said:
The column width thing isn't working...its on a ListBox
It says Type Mismatch and ColumnWidth is highlighted
'ID
Me.TxtStatus = "Select By ID"
With Me.ListEmployees
.RowSource = "SELECT Employees.EmployeeID " & _
"FROM Employees " & _
"ORDER BY Employees.EmployeeID;"
.ColumnCount = 1
.ColumnWidth = "1 in"
.Requery
End With
Any help appreciated.
Thanks
DS


ColumnWidth needs to be a numeric value. Try:

..ColumnWidth = 1440 ' that's 1 inch
 
D

DS

Randy said:
ColumnWidth needs to be a numeric value. Try:

.ColumnWidth = 1440 ' that's 1 inch
Yeah that worked! I can't understand it though. When I have more than
1 column I use this .columnWidths ="1 in;1.5 in"
and it Works?
Thaks
DS
 
R

Randy Harris

DS said:
Yeah that worked! I can't understand it though. When I have more than
1 column I use this .columnWidths ="1 in;1.5 in"
and it Works?
Thaks
DS

Ya, confuses the bejeebers outa me too.

ColumnWidth property requires a single numeric argument
ColumnWidths property requires a single string, but that string can have
multiple values separated by ;
For ColumnWidths, the default unit is twips ("1440;2880"), but you can enter
the unit if you want something else ("1 in; 2 in" or "5 cm; 10 cm", etc)

HTH,
Randy
 
D

DS

Randy said:
Ya, confuses the bejeebers outa me too.

ColumnWidth property requires a single numeric argument
ColumnWidths property requires a single string, but that string can have
multiple values separated by ;
For ColumnWidths, the default unit is twips ("1440;2880"), but you can enter
the unit if you want something else ("1 in; 2 in" or "5 cm; 10 cm", etc)

HTH,
Randy
Thanks, Thats certinaly a lot clearer!
DS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top