Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2002
    Posts
    9

    Unanswered: Linking Combo Box selections to a Command Button

    Basically I have a series of comboboxes that I want to control what specific form a command button opens up. Not every combobox has to be linked to this button, the last one is narrowed down enough where it is the only one that would have to be linked...... How do I do this?

    Also, if I didn't do it this way I was wondering how you go about having text boxes controlled by these same comboboxes(making them able to take data from different tables altogether based on the combo selections)

    Thanks in advance.

  2. #2
    Join Date
    Feb 2002
    Posts
    403
    You could consider a case statement based on your combo box selection, something along the lines of:

    Select case MyComboBox.Column(0)

    Case is = 1

    strA=Form1

    Case is = 2

    strA=Form 2

    Etc

    Then you would call your form open procedure using the string value as the form name.

  3. #3
    Join Date
    Dec 2002
    Posts
    9
    on what event would the select case coding go? would it be the selection of the combobox or would it be on the clicking of the command button?

  4. #4
    Join Date
    Feb 2002
    Posts
    403
    You could add it to either the after update of the combo box or the click of the button

Posting Permissions

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