Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Posts
    5

    Unanswered: Help with combo box

    Hi,

    Can I get some help in writing code for comboxes.

    I have a field r'eviewtype' with values frontend and backend. When frontend is selected then a new dropdown called 'FEdrop' should popup with values Prerecision, postrecision and other. When the value 'other' is selected an empty text box should show up. Similarily with backend.

    Thanks in advance,

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    In the AfterUpdate event of the reviewtype you can put:

    Code:
    Select Case Me.reviewtype
    
        Case "frontend"
    
            Me.FEDrop.RowSource="Prerecision;Postrecision;Other"
    
        Case Else
    
            Me.FEDrop.RowSource=""
    
    End Select
    Forgot to add, make sure the FEDrop's RowSourceType is set to Value List.

  3. #3
    Join Date
    Mar 2007
    Posts
    5
    I have the below code,

    Select Case review_type
    Case "frontend"
    FEDrop.RowSource = "A; B; C; D "
    Case "backend"
    FEDrop.RowSource = "ab; cd; df; gh "
    Case "non-IREP"
    FEDrop.RowSource = "ujju ; shri; dad; mom"
    Case Else
    FEDrop.RowSource = ""
    End Select

    How do I open an additional drop down list or text box when 4th value from the list is selected.

    I appreciate your help.

    Thanks,

  4. #4
    Join Date
    Nov 2005
    Posts
    113
    Do you mean like this:

    MsgBox FEDrop.Column(0,3)
    Return string D

    MsgBox FEDrop.ListIndex
    Return number 3 if you choice D in the combobox
    Last edited by Julita; 03-07-07 at 17:19.

  5. #5
    Join Date
    Mar 2007
    Posts
    5
    If the value 'D' from the above (in my code) drop down is selected then another drop down or a text box should pop up.

  6. #6
    Join Date
    Nov 2005
    Posts
    113
    Oh..sorry

    If Me.FEDrop.Value = "D" Then
    MsgBox "You choice is D"
    Else
    MsgBox "Bla bla"
    End If

Posting Permissions

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