Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    14

    Unanswered: CmbBox & selected index

    I have a combo box on my form, and on the load event, i want the combo box to display the first value. In vb.net, you would use me.cmb1.selectedindex = 0, but how is this accomplished in vba?? I tried the me.cmb1.value = me.cmb1.column(1,0), and other variations, but could not get it to work. Any help would be greatly appreciated. Thanks guys!

  2. #2
    Join Date
    May 2004
    Posts
    63
    jpetter7,

    You can right click on combo box properties and use the Format part of the properties and change the column width to 1; 0.

    Hope this helps

  3. #3
    Join Date
    Jun 2004
    Posts
    14

    Unhappy

    Thanks for the tip, but that would not work either!

  4. #4
    Join Date
    May 2004
    Posts
    63
    can you post the sample of your db

  5. #5
    Join Date
    Aug 2004
    Location
    Netherlands
    Posts
    2
    Hi

    Maybe
    Code:
    Cmb1.Value = Cmb1.Column(Cmb1.BoundColumn - 1, 0)
    will work?

    Gerard

Posting Permissions

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