Results 1 to 4 of 4
  1. #1
    sellingherbal's Avatar
    sellingherbal is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Location
    www.blogvietkieu.com
    Posts
    4

    Sub-Forms stop working after I add more table to the query

    I have a form with sub-forms. All the subforms work smoothly, I am able to assign students to classes, enter their late/absence data etc... But there's 1 subform that I want to include the Gender (male,female) so I have to go back to the query (see attached picture) to include the table with gender data and map it with other tables, then insert a combo box in that subform, which display the gender of the student along side with other data.

    But the problem is as soon as I modify the query for that subform, all the subforms (including that one) stop working, I'm not able to enter and change anything with error like Recordset is Noteditable ( see attached screenshot).



    And after I remove that table from the query and the combo box from the subform every works just fine again.

    Do you know why?
    Attached Thumbnails Attached Thumbnails not-editable.JPG   Query.JPG  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Post the query SQL statement. Are the tables joined with INNER type?

    If you want to provide db for analysis, follow instructions at bottom of my form.
    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
    sellingherbal's Avatar
    sellingherbal is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Location
    www.blogvietkieu.com
    Posts
    4
    Thank you Mod, according to the SQL stament below, the tables are joined with INNer type.

    SELECT ZStudentClassData.ClassAssignmentID, ZStudentClassData.SessionAbb, ZStudentClassData.ClassID, ZStudentClassData.RegistrationID, ZStudentClassData.Grade, ZStudentClassData.AbsentHours, ZStudentClassData.LateTimes, ZStudentSessionData.Deleted, ZClasses.Deleted, ZStudentClassData.RecommendID, ZStudentSessionData.SessionAbb, ZClasses.SessionAbb, ZStudentClassData.A1, ZStudentClassData.A2, ZStudentClassData.A3, ZStudentClassData.A4, ZStudentClassData.A5, ZStudentClassData.A6, ZStudentClassData.L1, ZStudentClassData.L2, ZStudentClassData.L3, ZStudentClassData.L4, ZStudentClassData.L5, ZStudentClassData.L6, ZStudentSessionData.RegistrationType, ZStudentPermanentData.Sex
    FROM (ZStudentPermanentData INNER JOIN ZStudentSessionData ON (ZStudentPermanentData.WhoNum = ZStudentSessionData.WhoNum) AND (ZStudentPermanentData.WhoNum = ZStudentSessionData.WhoNum)) INNER JOIN (ZClasses INNER JOIN ZStudentClassData ON ZClasses.ClassID = ZStudentClassData.ClassID) ON ZStudentSessionData.RegistrationID = ZStudentClassData.RegistrationID
    WHERE (((ZStudentClassData.SessionAbb)=[Forms]![ZAcademicMenu].[Form]![ActiveSession] And (ZStudentClassData.SessionAbb)=[Forms]![ZAcademicMenu].[Form]![ActiveSession] And (ZStudentClassData.SessionAbb)=[Forms]![ZAcademicMenu].[Form]![ActiveSession]) AND ((ZStudentSessionData.Deleted)=No) AND ((ZClasses.Deleted)=No) AND ((ZClasses.SessionAbb)=[Forms]![ZAcademicMenu].[Form]![ActiveSession]))
    ORDER BY ZStudentClassData.RegistrationID;



    Quote Originally Posted by June7 View Post
    Post the query SQL statement. Are the tables joined with INNER type?

    If you want to provide db for analysis, follow instructions at bottom of my form.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I suspect the issue is the INNER joins. INNER requires a matching record in both tables. This will make adding new records virtually impossible.

    You can include the 'lookup' tables in the form RecordSource to display the related info but cannot use one form to add new records to multiple tables.
    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.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Navigational Buttons STOP working !!
    By THE STUDENT in forum Access
    Replies: 6
    Last Post: 06-11-2013, 04:20 PM
  2. Buttons STOP working !!
    By THE STUDENT in forum Forms
    Replies: 3
    Last Post: 06-10-2013, 08:11 PM
  3. Replies: 3
    Last Post: 05-07-2012, 07:57 PM
  4. Replies: 1
    Last Post: 12-09-2011, 07:34 AM
  5. Replies: 9
    Last Post: 03-29-2011, 07:08 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