Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo box Select Case (A2k)

    Depending on the value of my combo box, I would like to make alternate text/combo boxes visible/invisible. No errors, it just doesn't work. Package_Type is the name of my combo box.

    Select Case Me.Package_Type
    Case "Extension"
    Me.Extension_Length.Visible = True
    Case Else
    End Select
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo box Select Case (A2k)

    What is the Row Source of the combo box, and what are the Column Column Count and Column Width properties?

  3. #3
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo box Select Case (A2k)

    Hans. I got it.... <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30> Corrected below.
    Thanks for the shove in the right direction

    Select Case Me.Package_Type.Column(1)
    Case "Extension"
    Me.Extension_Length.Visible = True
    Case Else
    End Select
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo box Select Case (A2k)

    I assume that the first column Column(0) contains a numeric code for the package type. If that is correct, you can also use something like

    Select Case Me.Package_Length
    Case 1
    ...

  5. #5
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo box Select Case (A2k)

    I didn't think of that.... <img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15>

    <img src=/S/yep.gif border=0 alt=yep width=15 height=15> <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  6. #6
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Combo box Select Case (A2k)

    aaahh Hans and you beat me to it. I was doing it with a value list.

    Just as a matter of interest, is the listings that are bound to a the combo coming from a look up table or another table that contains the data.

    If I have specific set of look up tables, I only add one column and set that as the primary key( to save inadvertent duplication if necessary) and when I create the combo/list boxes I do not have to worry about column designation. I suppose you may be using a more complicated action though to assign references from another field though. My <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>
    Jerry

  7. #7
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo box Select Case (A2k)

    <hr>I suppose you may be using a more complicated action though to assign references from another field though.<hr>

    <img src=/S/nope.gif border=0 alt=nope width=15 height=15> Not this time, I just inherited a poorly designed table. Until I discern the unique values, I'm stuck doing it this way....by the end of the weekend I should have it down to one column...however since we work weekends, I need to have this done tonight.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

Posting Permissions

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