Problems setting List Properties

kermit5

Registered User.
Local time
Today, 21:56
Joined
Nov 2, 2001
Messages
122
Problems setting List Properties*RESOLVED*

I am having difficulty setting the following properties:
Column Widths
List Width

Here is my code

ctlControl.RowSource = "qryHeadDetails"
ctlControl.ColumnCount = 5
ctlControl.ColumnHeads = True
ctlControl.ColumnWidths = 1
ctlControl.ListWidth = 2.5
ctlControl.LimitToList = True

After running this code, the COLUMN WIDTHS value is:
0.0007"
And the LIST WIDTH value is:
0.0021"

What I would like to do is set the column widths to the following:
0";.5";.5";.35";.75"
and the LIST WIDTH value to 2.5"

What am I doing wrong?
Scott
 
Last edited:
The List box Widths are in Pixels (1440 per 1 inch)

Multiply each width by 1440 and set the ColumnWidths equal to that string

ctlControl.ColumnWidths = "0;720;720;504;1080"
 
Thanks!
 
Try:

ctlControl.RowSource = "qryHeadDetails"
ctlControl.ColumnCount = 5
ctlControl.ColumnHeads = True
ctlControl.ColumnWidths = "0 in;.5 in;.5 in;.35 in;.75 in"
ctlControl.ListWidth = "2.5 in"
ctlControl.LimitToList = True

Make sure that "qryHeadDetails" has 5 columns.

If you want the columns separate by centimeteres instead of inches, use 'cm' instead of 'in.'

See if this helps
 

Users who are viewing this thread

Back
Top Bottom