Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    combo box width (vb6)

    I am using the following to pull data from an access db. How can i make the pull down box widder than the default?

    '-=-=-=-=-=-=-=-=-=-=-
    'Word 4 number
    'Retrieve Category info from table
    '-=-=-=-=-=-=-=-=-=-=-
    Set rst2 = db.OpenRecordset("work4numberquery")
    Set ctl = Item.GetInspector.ModifiedFormPages("PC Conversion").Controls("cboclient")
    'The above is the name of the form and not the name of the tab
    ctl.ColumnCount = 2
    ctl.ColumnWidths = "50; 120 pt"

    'Assign Access data to an array of 2 columns and 500 rows
    CategoryArray(99, 2) = rst2.GetRows(500)
    ctl.Column() = CategoryArray(99, 2)
    '-=-=-=-=-=-=

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: combo box width (vb6)

    Daniel,

    I'm not sure if I understand your problem, but if you are trying to set the width property of a combo box, you can do it interactively on the user form by resizing manually or via VB code by assigning a value to the Width property.

    Hope that is of some help.

    Andrew C

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: combo box width (vb6)

    Are you trying to do this from VB or from Access VBA? Access comboboxes have a ListWidth property that you can set. I've never found the equivalent in VB.
    Charlotte

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: combo box width (vb6)

    My "<A target="_blank" HREF=http://www.vif.com/users/cgreaves/ProcedureClipper.htm>PClip</A>"per utility has two slider buttons that adjust the width of two ListBoxes dynamically (and a ScreenSize) that resets the form after changing screen resolution on-the-fly). If you think that's what you need I could post the Word97VBA code here.

Posting Permissions

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