Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228

    Listbox column width idea - feedback


    I have a listbox that will update based on the value selected in a combo box.

    All the records are in one table. But depending on what the category I have selected in the combo box is, I want the listbox to display different fields.

    I'm thinking this shouldn't be too hard. If I make all the fields available then the ones I don't have can be set to 0 column width via VBA depending on the value selected.

    this is just an idea, so any feedback appreciated, also if anyone knows of any links or even knows themselves how I would go about defining column width in VBA I'd appreciate it.

    Thanks!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    sounds fine.
    set the col widths....
    lstBox.ColumnWidths = "1;0.5;0;0;0.5"

  3. #3
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Another method would be to have multiple listboxes, then you could make them visible/invisible: Me!lstbox.Visible=True(False)

  4. #4
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Thanks both! ill have a go at this today. See if I can get it as I want it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Autosize a column's width and height?
    By Isla in forum Reports
    Replies: 1
    Last Post: 04-05-2016, 01:58 PM
  2. Replies: 3
    Last Post: 04-10-2015, 02:35 PM
  3. Replies: 2
    Last Post: 02-22-2012, 05:10 PM
  4. Replies: 1
    Last Post: 11-02-2011, 02:18 PM
  5. Replies: 0
    Last Post: 12-25-2008, 10:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums