Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi moke

    The SQL is as follows:-



    Code:
    SELECT tblTreatmentPlans.StudentID, tblGoalObjectives.GoalObjectiveID, tblGoalObjectives.PlanID, tblGoalObjectives.ObjectiveID, tblGoalObjectives.ObjectiveLetterNumber, tbluObjectives.Objective, tblGoalObjectives.SortNr
    FROM tbluObjectives RIGHT JOIN (tblTreatmentPlans INNER JOIN tblGoalObjectives ON tblTreatmentPlans.PlanID = tblGoalObjectives.PlanID) ON tbluObjectives.ObjectiveID = tblGoalObjectives.ObjectiveID
    ORDER BY tblGoalObjectives.SortNr;
    I can't upload the Database as it does not belong to me.

    In the structure there is a process to record a Number of Goals & Objectives for a Student.

    On the Form that I am currently working on List122 shows all of the Objectives associated with a specific Student.

    List187 shows a list of Interventions for specific GoalObjectives with Goal ObjectiveID linking List122 & List187

    Hope that is as clear as mud?
    Attached Thumbnails Attached Thumbnails Goals.JPG  
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  2. #17
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Code:
    SELECT tblTreatmentPlans.StudentID, tblGoalObjectives.GoalObjectiveID, tblGoalObjectives.PlanID, tblGoalObjectives.ObjectiveID, tblGoalObjectives.ObjectiveLetterNumber, tbluObjectives.Objective, tblGoalObjectives.SortNr
    FROM tbluObjectives RIGHT JOIN (tblTreatmentPlans INNER JOIN tblGoalObjectives ON tblTreatmentPlans.PlanID = tblGoalObjectives.PlanID) ON tbluObjectives.ObjectiveID = tblGoalObjectives.ObjectiveID
    ORDER BY tblGoalObjectives.SortNr;
    So if this is the sql of the first listbox, the multi select one, the first column (column(0)) is studentid not GoalObjectiveID. Correct? GoalObjectiveID is in column(1).

    Notice that getLBX has arguments. The default for selected column is column 0. So you would need to change -
    getLbx(List122) to getLbx(List122,1) to change the selected column to the correct column of the listbox.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  3. #18
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    hi moke

    Still the same error.

    I will try to put together the process in a Test Db and upload shortly
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  4. #19
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi moke

    Here with a Test Db

    In the Form that opens at startup - select the student "M Allien"

    1 x Measurable Objective will be displayed

    When you select the Objective I get the "Type Miss-Match" Error

    Your help appreciated
    Attached Files Attached Files
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  5. #20
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    I think I found it.

    Code:
    Private Sub List122_AfterUpdate()
    Me.List187.RowSource = "SELECT qryObjectiveList.GoalObjectiveID, [ObjectiveLetterNumber] & " - " & [Objective] AS O, qryObjectiveList.ObjectiveID, qryObjectiveList.SortNr FROM qryObjectiveList WHERE qryObjectiveList.[GoalObjectiveID] in(" & getLBX(List122, 0) & ")"
    End Sub
    Need to change to single quotes

    Code:
    Private Sub List122_AfterUpdate()
    Me.List187.RowSource = "SELECT qryObjectiveList.GoalObjectiveID, [ObjectiveLetterNumber] & ' - ' & [Objective] AS O, qryObjectiveList.ObjectiveID, qryObjectiveList.SortNr FROM qryObjectiveList WHERE qryObjectiveList.[GoalObjectiveID] in(" & getLBX(List122, 0) & ")"
    End Sub
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  6. #21
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi moke

    As always spot on

    I would never have been able to work out the Single Quotes Option

    Many thanks
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  7. #22
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Your Welcome and good luck with your project.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cascade Menu
    By VICTOR HUGO in forum Forms
    Replies: 7
    Last Post: 10-12-2018, 12:14 PM
  2. Cascade Delete when Its not set?
    By Perceptus in forum Queries
    Replies: 16
    Last Post: 10-13-2015, 01:21 PM
  3. Help with cascade combo box
    By jwalther in forum Forms
    Replies: 2
    Last Post: 06-19-2015, 07:19 AM
  4. Relationship Cascade help
    By murry in forum Database Design
    Replies: 6
    Last Post: 04-16-2012, 10:49 AM
  5. cascade combo box
    By Andyjones in forum Access
    Replies: 6
    Last Post: 04-05-2012, 04:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums