Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    Belfast, UK
    Posts
    87

    Unanswered: load form from combobox.

    Hi,

    I have a combobox for running different reports, the reports are all operating from queries. The queries have different criteria that need to be selected, so i want to be able to load a form where the user can select the criteria after first selecting the report they wish to run.

    Also the command button needs to reflect the report option.

    Anyone got any ideas?

    Thanks.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Re: load form from combobox.

    Originally posted by bertthefreak
    Hi,

    I have a combobox for running different reports, the reports are all operating from queries. The queries have different criteria that need to be selected, so i want to be able to load a form where the user can select the criteria after first selecting the report they wish to run.

    Also the command button needs to reflect the report option.

    Anyone got any ideas?

    Thanks.
    Do you want to populate all Report names in the comboBox so that the user can choose one?

  3. #3
    Join Date
    Dec 2003
    Location
    Belfast, UK
    Posts
    87
    no I have the details in the box already.

    What I want is when the user click ok on form1 (with combobox) form2 will load and depending on the report choosen different options will/wont be available.

    Form1 may contain
    Report - Combobox1 - Sales rep report
    Region Report
    Weekly Report
    OK - Command button

    form2 may contain
    Date From - textbox1
    Date To - textbox2
    Sales Rep - Combobox1
    Region - Combobox2
    OK - Command button

    When user selects sales rep report then region combobox on form 2 should be disabled, ok command should run sales rep report.

    sorry if this wasn't explained properly earlier.

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Then you can make a SELECT CASE according to the chosen report on ComboBox1.

    Select Case .cmbo1.ListIndex
       Case 0
        'your code according to the first selection

       Case 1
        'your code according to the second
    selection

       Case 2
         ' your code according to the third selection


       Case Else
    End Select

Posting Permissions

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