Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2010
    Posts
    44

    Unanswered: Secret behind ListBox Size etc

    I am trying to make a listbox with 4 columns and headings. You would think if I wanted 4 colums to be 1 for the width a piece then the width for the whole control should be 4. It seems it makes it bigger when I do that. How can I control the size better. Do I need to make it so much bigger than my columns to show right etc?
    Thanks.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Using VBA you can control the width of the columns as well as the width of the listbox down to the twip using the ColumnWidths and Width properties, respectively. 1 twip is 1/1440 of an inch.
    Have a nice day!

  3. #3
    Join Date
    Jan 2010
    Posts
    44
    If my columns are 4 and the width of those columns are: 1";4";1";1" - what should my width be of the actual listbox?

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    1+4+1+1 = 7 so the width would be 7". Remember that you can also hide columns and have something such as 0";4";1";1" with a width of 6". Or you can concatenate 2 fields into 1 column in the rowsource query such as: FullName: [FirstName] & " " & [LastName] and make that column wide enough for the data. Perhaps I'm misunderstanding though.
    Last edited by pkstormy; 04-24-10 at 13:10.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Jan 2010
    Posts
    44
    Yea, thats what I did, but it still is distorted etc. Its like the first 3 columns are fine, but it doesn't stop after the 1 inch on the final column.

  6. #6
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    What do you mean by "but it doesn't stop after the 1 inch on the final column"? Can you post a picture of the listbox as it is now?
    Have a nice day!

  7. #7
    Join Date
    Jan 2010
    Posts
    44
    I changed it last night and took it to 1,3,1,1 instead of 1,4,1,1 and set the width to 6 and it seems to be right now. Now sure why it didn't like the 4 and 7 column width? Ill make a new post if I have more issues. Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •