Results 1 to 3 of 3
  1. #1
    bobm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    4

    Horizontal scroll bar disappearing when using additem to populate

    Hi,
    I havea listbox that upon form opening has a horizontal scroll bar.
    I use additem to add a string that has 26 columns i.e. 26 text strings separated by ';'
    It did have a lot more columns. The string, in total, is definetly wider than the list box.
    The problem is the scroll bar disappears, any ideas?

    Code:
        Select Case frmExtras
            Case 1
                intFieldCount = 57
                Me!lstResult.ColumnCount = 26
                Me!lstResult.ColumnWidths = "1cm;1cm;1.822cm;1.2cm;4cm;1cm;1cm;1cm;1.6cm;1.6cm;1.6cm;1.6cm;1.6cm;1.6cm;1.6cm;3.6cm;1.6cm;2.2cm;2.1cm;1cm;1cm;1cm;1cm;1cm;1cm;1cm"
               
                Set qdf = myDb.QueryDefs("qryAssetDetails_structure")
                strHdg = "Asset;Comp;Asset Code;IPM No;Asset Name;Comp;Make;Cond;LengthPCT;Easting;Northing;Plan;Run Dist; End Dist; Owner;Last Inspection;Bank Side;" & _
                        "Structure Type;Structure Name;Safety;Scouring;Increase;Capacity;Capacity Constraint;Serial Number;Load Capacity STD Code;Material"


  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I count 27 headers.

    In my testing, the horizontal scroll bar is only showing up when any one column is wider than the listbox width, with exception of the last.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    bobm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    4

    Thumbs up

    Thanks for spotting the miss count. I added another column width with a large column width for the second last column and it worked!

    I then reduced the column width and it still works. Sorry for the counting error.


    I thank you sincerely

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

Similar Threads

  1. Replies: 1
    Last Post: 05-09-2014, 11:56 AM
  2. Replies: 13
    Last Post: 07-19-2013, 08:34 AM
  3. Replies: 2
    Last Post: 11-21-2012, 12:11 AM
  4. Control of horizontal scroll bar
    By smthomer in forum Programming
    Replies: 3
    Last Post: 08-25-2010, 10:52 AM
  5. additem to list using globals
    By dalestorey in forum Programming
    Replies: 0
    Last Post: 03-24-2010, 03:53 PM

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