Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48

    Red face Master Form/ Sub Form

    Hello Expert,



    I have Master Form (Frm_StudentMain, Table: TBL_Student_main), and Sub Form (Frm_CourseDetail, Table: TBL_CourseDetail), and both forms link by student_id.

    On the sub form, I use 3 combox to display course name1, course name2, course name 3. (TBL_courselist for combox, and fields are :student_id, course_id, course_name). All the students have chosen courses but they are differently;

    Here is my question:

    On these 3 combox drop down list, they should only show the courses which related with this student.

    How do I do this?

    Thanks,
    Cindy

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Please post your tables and relationships (jpg/png).

    Students--->StudentSelectedCourses<---Courses

  3. #3
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48
    Thank you very much!


  4. #4
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48
    Click image for larger version. 

Name:	post.jpg 
Views:	23 
Size:	264.2 KB 
ID:	45289Click image for larger version. 

Name:	post.jpg 
Views:	23 
Size:	264.2 KB 
ID:	45289

  5. #5
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48
    this is the table (Tbl_course detail) for Subform, and FirstCourse, SecondCourse, ThirdCourse should come from the combox in the subform.Click image for larger version. 

Name:	SubForm.jpg 
Views:	21 
Size:	292.1 KB 
ID:	45291

  6. #6
    CarlettoFed is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    257
    Does every student have to select three courses?

  7. #7
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48
    This is just an example. some students might only have one course, some students might have 5 courses. but the subForm only shows 3 courses.

  8. #8
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  9. #9
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48
    sorry, I just used the course as examples. Actually, I am dealing with disabilities.......with services.....

  10. #10
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Perhaps you could post a copy of the database - remove anything confidential - so we can see the issue in context.
    We often see analogies which can confuse the underlying requirement.
    A more appropriate, normalized structure may exist.

    It isn't clear if a course is offered at different times/days. I'm trying to understand your Mon, Tues, Wed fields. I think your tables structure could be improved, but only you know the real requirement.

  11. #11
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48
    how to post an Access database here?

  12. #12
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  13. #13
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48
    ok, I just made a simple access database. please see.
    Attached Files Attached Files

  14. #14
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48
    On table TBL_RecoveryServiceDetails, for FirstService, I used the lookup, but it didn't work.

  15. #15
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Would this sort of layout work for you?

    TestDB-davegri-v01.zip

    Click image for larger version. 

Name:	cl.png 
Views:	14 
Size:	35.3 KB 
ID:	45303

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

Similar Threads

  1. Replies: 12
    Last Post: 07-06-2020, 07:25 AM
  2. Replies: 3
    Last Post: 11-16-2016, 09:24 AM
  3. Replies: 3
    Last Post: 08-02-2016, 08:20 AM
  4. Replies: 2
    Last Post: 09-17-2014, 12:06 PM
  5. Replies: 9
    Last Post: 06-12-2012, 10:22 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