Results 1 to 5 of 5
  1. #1
    chook is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    8

    Listbox adjustable columns

    Hi,



    Is there anyway to make columns adjustable columns in a listbox?

    I want to be able to shift the column horizontally so you can see all the text.

    Thanks

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Just edit the Column Widths.

  3. #3
    chook is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    8
    Quote Originally Posted by burrina View Post
    Just edit the Column Widths.
    Yea thats how it is at the moment. But man they some big columns lol oh well..

    Thanks anyway.

    One more query... With a listbox you can enable the headers which i have done. I want to be able to sort by column by clicking on the header so it will sort on that column alphabetically or numerically as you can in some programs.
    Is this something a listbox will allow you to do?

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    This is typically done with a command button with vba code: Here is an example:

    '--------------- Code Start --------------- Private Function basOrderby(col As String, xorder As String) As Integer Dim strSQL As String 'Clear captions from command buttons ClearCaptions 'Set row source for list box strSQL = "SELECT DISTINCTROW strSalespersonID, " & _ "strSalespersonFirstName,strSalespersonLastName,st rRegion " strSQL = strSQL & "FROM tblSalespersonContact " strSQL = strSQL & "ORDER BY " & col & " " & xorder Me!lstSearch.RowSource = strSQL Me!lstSearch.Requery End Function '---------------- Code End ----------------

  5. #5
    chook is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    8
    Thank you i shall have a play.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-10-2012, 11:21 PM
  2. Replies: 2
    Last Post: 12-06-2011, 01:02 AM
  3. Replies: 2
    Last Post: 08-12-2011, 01:01 PM
  4. Columns in a Listbox
    By craigalaniz in forum Access
    Replies: 3
    Last Post: 01-07-2010, 01:11 PM
  5. Programming Adjustable Pricing Fees
    By JDA2005 in forum Programming
    Replies: 2
    Last Post: 07-07-2009, 10:50 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