Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    2

    Unanswered: Linking information to two combo boxes

    The problem I have is I have two combo boxes one contains tasks and the other contains subtasks. What I want to do is when I select a task the associatted subtasks populate the sub task combo boxes and have the abilility to select one. The combo boxes appear in a sub form and right now for the row source under the sub task combo box is SELECT [Sub_Tasks].[Sub_Task], [Sub_Tasks].[Task] FROM Sub_Tasks WHERE ((([Sub_Tasks].[Task])=[forms]![ResponsibilitiesCurrent]![ResponsibilityCurrent_subform]![Task]));
    Where ResponsibilitiesCurrent is the main form name. What happens is when I try to select a sub task I get a prompt telling me to enter a parameter and when I take out the sub form name from the row source the sub task combo box is empty.

  2. #2
    Join Date
    Oct 2003
    Location
    US
    Posts
    343
    You can do a little better than that. Initially set both combo boxes to pull all ie for tasks set its row source property to SELECT TASKS FROM tblTASKS and for subtasks SELECT SUB_TASK FROM SUBTASKS.

    Then in the after Update event of Task Combo write this code.
    cboSubTask.RowSource="SELECT Sub_Task from Sub_Tasks where Task=" & me.cboTask

    THat should do it.

  3. #3
    Join Date
    Jul 2004
    Posts
    2
    Even after I do that I get an prompt that says enter parameter value does it have anything to do with it being a subform?

  4. #4
    Join Date
    Oct 2003
    Location
    US
    Posts
    343
    Well you have to check all your queries. one of the queries must be requiring you to enter a parameter. Check the parameter option under Query on the main menu

Posting Permissions

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