Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25

    Cascading Combo Box - Form, connecting the Sub Form

    Hi,



    I am trying to create a cascading Combo Box

    My Main Form has a Sub Form, where I have a combo Box, after clicking on which I want my 2nd Sub Form would show the only values, associated with that Combo box.

    So, it is Main Form -> Sub Form - Sub Form 2.
    And I want a cascading combo box - selecting values in the button located in Sub Form -> the only
    Sub Form 2 values appear, associated with that button in the Sub Form.

    (plz, see the screenshot below):
    Click image for larger version. 

Name:	MainForm.JPG 
Views:	28 
Size:	179.2 KB 
ID:	40243

    Below, are my Categories/ Objectives structure(the certain Category -> associated with the certain Objective:
    Click image for larger version. 

Name:	CategoryObjective.JPG 
Views:	29 
Size:	163.1 KB 
ID:	40244

    To achieve my goal, I clicked on the ObjectiveID in my SubForm2 and in the Data section I wrote an expression, plz see below:
    Click image for larger version. 

Name:	SubForm_Design.JPG 
Views:	29 
Size:	221.1 KB 
ID:	40245
    Click image for larger version. 

Name:	SubForm_Design2.JPG 
Views:	28 
Size:	42.5 KB 
ID:	40246

    And, also, in the Event Procedure "On Click" I added -

    Private Sub ObjectiveID_Click ()
    Me.Requery
    End Sub


    But this is not working, still selecting ALL Objectives ...

    Plz, help
    Thank you..


    Ps-
    I can't attach a zipped file, because it's 6 MB while the maximum is 2 MB and zipx format is not allowed...





    Attached Files Attached Files
    Last edited by Hell_1934; 11-22-2019 at 12:06 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Can make copy of db and remove most data and/or objects not related to issue for attachment to post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25
    Quote Originally Posted by June7 View Post
    Can make copy of db and remove most data and/or objects not related to issue for attachment to post.
    I did, but it's still big
    I will try today in a few hours again, when more time!

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    You actually have a form with one subform. There are no cascading combo boxes.
    The subform includes a subdatasheet of related records but that isn't a second subform

    Subdatasheets cause performance issues and often confuse end users.
    You would indeed be better off with main form / subform & sub-subform all linked together with master and child fields.

    If you want to view an example of a form with cascading combos (5 of them), see https://www.access-programmers.co.uk...d.php?t=302126
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25
    Quote Originally Posted by isladogs View Post
    You actually have a form with one subform. There are no cascading combo boxes.
    The subform includes a subdatasheet of related records but that isn't a second subform

    Subdatasheets cause performance issues and often confuse end users.
    You would indeed be better off with main form / subform & sub-subform all linked together with master and child fields.

    If you want to view an example of a form with cascading combos (5 of them), see https://www.access-programmers.co.uk...d.php?t=302126
    Ok,
    Is it possible to have a dependency-
    Category ->Objective in my case?

    So, that after I'll select the Category from combo box in my Sub Form, the appropriate Obective list would appear in the Sub Data sheet?

    If yes - what do I have to do?

    I'll also try to redevelop a little bit, the way you adviced - with Form -> Sub Form - Sub Sub Form.
    And then - will look at your link where it's a zipped db example...

    Thank you!

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Do you have a table that associates categories with objectives?

    Really need to see your db structure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25
    Quote Originally Posted by Hell_1934 View Post
    Ok,
    Is it possible to have a dependency-
    Category ->Objective in my case?

    So, that after I'll select the Category from combo box in my Sub Form, the appropriate Obective list would appear in the Sub Data sheet?

    If yes - what do I have to do?

    I'll also try to redevelop a little bit, the way you adviced - with Form -> Sub Form - Sub Sub Form.
    And then - will look at your link where it's a zipped db example...

    Thank you!
    I am trying to send you a message, and I will send a DB, but in 2 hours - when I'll have access to my PC


    Thank you!

  8. #8
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25
    Quote Originally Posted by June7 View Post
    Do you have a table that associates categories with objectives?

    Really need to see your db structure.
    Hello,
    I am finally at the Desktop!

    I added a zip file as an attachment. It is really a .zipx file, but this Forum doesn't allow to attach zipx.
    Please, rename into <File Name>.zipx and it should be no problem to unzip it.
    I think it should be no problem in any case...

    Your advice about the cascading Combo box worked great on another Project!
    But this one is a little bit trickier. Very complex Relations and tables (I removed the Program / Client only)

    So, my goal is in that SubForm - to select "Category" combo box, then - only 4 choices should appear for Category 1 - 1. Orientation / Assessment - (while now there are All of them)
    Click image for larger version. 

Name:	MainForm.JPG 
Views:	23 
Size:	179.2 KB 
ID:	40251

    Below are the tables - Category / Objectives with the appropriate selection - (my goal - how I want it to be)
    Click image for larger version. 

Name:	CategoryObjective.JPG 
Views:	23 
Size:	163.1 KB 
ID:	40252


    Thank you, I'll be waiting for your answer
    Attached Files Attached Files

  9. #9
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25
    Quote Originally Posted by June7 View Post
    Do you have a table that associates categories with objectives?

    Really need to see your db structure.
    Ok, Just attached zipx (renamed to zip) into my main post...

  10. #10
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25
    Quote Originally Posted by isladogs View Post
    You actually have a form with one subform. There are no cascading combo boxes.
    The subform includes a subdatasheet of related records but that isn't a second subform

    Subdatasheets cause performance issues and often confuse end users.
    You would indeed be better off with main form / subform & sub-subform all linked together with master and child fields.

    If you want to view an example of a form with cascading combos (5 of them), see https://www.access-programmers.co.uk...d.php?t=302126
    Actually, I double checked - there is a Main Form / Sub Form / Sub Sub Form -
    Click image for larger version. 

Name:	3Forms.jpg 
Views:	21 
Size:	291.0 KB 
ID:	40254

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    I cannot extract from your zip, renaming to zipx just makes it worse. Why don't you use Windows Compression?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25
    Quote Originally Posted by June7 View Post
    I cannot extract from your zip, renaming to zipx just makes it worse. Why don't you use Windows Compression?
    Let me try ...

  13. #13
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25
    Quote Originally Posted by June7 View Post
    I cannot extract from your zip, renaming to zipx just makes it worse. Why don't you use Windows Compression?
    How about this?
    (I shortened the Category / Objectives down to 2 Categories, 7 Objectives - 4 in Category 1; 3 in Category 2), Compact & Repair Database

    Just to remind my problem - After running the "Main" Form, when adding a new record (pencil) there are All Objectives in each Category;
    while I need 4 Objectives for Category 1; 3 Objectives for Category 2.

    Thank you so much...
    Attached Files Attached Files

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Suggest not using WHID as fieldname for PK in every table. Each name should be unique. Like StaffID_PK.

    Advise to remove hyphen character from EHRChartReview_Category-Objective. Spaces/punctuation/special characters (except underscore) will cause issues.

    No need to link EHRChartReviewCategory table to EHRChartReviewObjective. Why is CategoryID field even in EHRChartReviewObjective table?

    Now what exactly is this business process? What is being reviewed? When a chart review is initiated, do you need to select category/objective pairs? Will each review have multiple category/objective pairs? Perhaps relationship should be between EHRChartReview_Review and EHRChartReview_Category-Objective? Presume each staff can have multiple category/objective pairs and each pair can associate with multiple staff. A junction table to associate EHRChartReview_Review WHID and EHRChartReview_Category-Objective WHID may be appropriate.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    Hell_1934 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    25
    Quote Originally Posted by June7 View Post
    Suggest not using WHID as fieldname for PK in every table. Each name should be unique. Like StaffID_PK.

    Advise to remove hyphen character from EHRChartReview_Category-Objective. Spaces/punctuation/special characters (except underscore) will cause issues.

    No need to link EHRChartReviewCategory table to EHRChartReviewObjective. Why is CategoryID field even in EHRChartReviewObjective table?

    What is being reviewed?
    When a chart review is initiated, do you need to select category/objective pairs?Will each review have multiple category/objective pairs? Perhaps relationship should be between EHRChartReview_Review and EHRChartReview_Category-Objective? Presume each staff can have multiple category/objective pairs and each pair can associate with multiple staff. A junction table to associate EHRChartReview_Review WHID and EHRChartReview_Category-Objective WHID may be appropriate.
    What is being reviewed?
    This is the Client's (patient's) evaluation process.
    Employee has to evaluate the Client, by entering Client's answers from the paper into the Objective-Category Forms
    I removed the Clients table to simplify this DB. It was the same as the Staff (Employee) table.

    When a chart review is initiated, do you need to select category/objective pairs? yes, pairs only.

    Each category must be associated with the Objective: You can see it by clicking the + sign in the Category Form

    Category 1 - 1. Orientation/Assessment -> a. Comprehensive orientation completed
    b. Assessment process thorough & complete
    c. Assessment process within the guidelines for timely completion
    d. Individual's strengths, abilities, needs and prrefferrennccess, desired outcomes and expectations assessed during the
    assessment

    Category 2 - 2. Individual Plan -> a. Individual plan is completed
    b. Goals & objectives are comprehensive and based on the assessment
    c. Goals & objectives are based on the input of the person's served

    Will each review have multiple category/objective pairs? yes. Each Review has to have ALL the Category/Objective pairs selected - either Yes/No/NA values
    In this case - 1. Orientation / Assessment with its Objectives and 2. Individual Plan with its Objectives has to be reviewed

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

Similar Threads

  1. Cascading combo on sub form
    By james7705 in forum Forms
    Replies: 2
    Last Post: 05-14-2018, 06:08 PM
  2. Cascading Combo Box on Form Confusion
    By synses in forum Forms
    Replies: 9
    Last Post: 03-19-2017, 07:24 PM
  3. Search Form - Cascading Combo Boxes
    By WeeTerrier in forum Forms
    Replies: 7
    Last Post: 12-05-2011, 08:26 PM
  4. Cascading Combo box in Continuous Form
    By neo651 in forum Access
    Replies: 1
    Last Post: 09-15-2011, 02:34 AM
  5. cascading combo form
    By tonysomerset in forum Forms
    Replies: 0
    Last Post: 08-27-2008, 02:10 AM

Tags for this Thread

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