Results 1 to 9 of 9
  1. #1
    Perfac's Avatar
    Perfac is offline Expert
    Windows 7 64bit Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618

    Subform fail to update


    I am probably missing something obvious. Table t01RaltiveSub, query q01RelativeSub, form f01RelativeSub. In form f01Employee, form f01RelativeSub is added as a Subbform. Foreign key employ_ID07 in f02RelativeSub joining with employID in t01Employee.

    The problem is that even though queries q01RelativeSub and q01Employee is updatable. The subform inside the form does not allow updates. We recently set On Load additions to false but I even took that out.Click image for larger version. 

Name:	Untitled.jpg 
Views:	19 
Size:	262.0 KB 
ID:	32985

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,418
    check the subform form properties - if you previously used on load to set allowadditions to false and subsequently saved the form, it will have saved with that setting

  3. #3
    Perfac's Avatar
    Perfac is offline Expert
    Windows 7 64bit Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    I removed the VBA that set Allow additions and delete to false, and set it to be on. We make backups everyday. On the backup of two days ago it worked and still works. I don't know what happened for it not to work any more. I recreated the table, query and form and still, no solution yet.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,418
    what is the sql to the subform recordsource

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,975
    Long shot. Check whether the Boolean field used for your checkbox has a default value. If not, add as true or false as preferred.

    Failing that, please provide the SQL for both forms.

    BTW I hope the data shown isn't real.

    EDIT Ajax got there first
    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

  6. #6
    Perfac's Avatar
    Perfac is offline Expert
    Windows 7 64bit Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Data is not real. SQL for two queries. q01Employee and q01Realtive Sub. I will try to attach the database.

    SELECT t01Employee.EmployID, t01CombinedEntity.EntityName01 AS EmployeeName01, t01Employee.EmployeeNum01, t01Employee.Addrss_ID06, t01Employee.BnkPrt_ID05, t01Employee.BusPol_ID03, t01Employee.SalPrc_ID01, t01Employee.JobTit_ID03, t01Employee.Langge_ID01, t01Employee.Nation_ID01, t01Employee.Qualif_ID01, t01Employee.MarSta_ID01, t01Employee.RetRes_ID01, t01Employee.NamesOnId, t01Employee.NameCalled, t01Employee.IDNumber01, t01Employee.CelPhnNum01, t01Employee.LandlineNum01, t01Employee.EmlAdr06, t01Employee.UserName02, t01Employee.Password02, t01Employee.DateOfBirth01, t01Employee.StartDate03, t01Employee.DateLeft1, t01Employee.DateLeft2, t01Employee.DateLeft3, t01Employee.SalaryType, t01Employee.EmploymentStatus02, t01Employee.TaxNumber01, t01Employee.MedicalAid01, t01Employee.PensionFund01, t01Employee.Chkpst05, t01Employee.NumOfChildren, t01Employee.OtherDeduct, t01CombinedEntity.CmbEntID, t01CombinedEntity.EntTpe_ID01, t01CombinedEntity.LdgAcc_ID01, t01CombinedEntity.VatRte_ID02, t01CombinedEntity.EntityName01, t01CombinedEntity.Check011, t01CombinedEntity.Logo01, t01CombinedEntity.Photos01, t01CombinedEntity.Documents01, q01Address.AddrssID, q01Address.PstCdePO_ID, q01Address.PstCdeST_ID, q01Address.POBoxNum, q01Address.StreetNumber, q01Address.StreetName, q01Address.BuildingName, q01Address.RoomNumber, q01Address.PPstCde, q01Address.PSuburb, q01Address.PCity, q01Address.PProvince, q01Address.SPstCde, q01Address.SSuburb, q01Address.SCity, q01Address.SProvince, t01BankParticulars.BnkPrtID, t01BankParticulars.BnkBrc_ID, t01BankParticulars.AccTpe_ID01, t01BankParticulars.AccountName, t01BankParticulars.AccountNum, q04BankBranch01.BnkBrcID, q04BankBranch01.BnkBrcNum, q04BankBranch01.Bnk_ID01, q04BankBranch01.BranchName02, q04BankBranch01.BranchCode01, q04BankBranch01.BankName02
    FROM (((t01CombinedEntity INNER JOIN t01Employee ON t01CombinedEntity.CmbEntID = t01Employee.EmployID) INNER JOIN q01Address ON t01Employee.Addrss_ID06 = q01Address.AddrssID) INNER JOIN t01BankParticulars ON t01Employee.BnkPrt_ID05 = t01BankParticulars.BnkPrtID) INNER JOIN q04BankBranch01 ON t01BankParticulars.BnkBrc_ID = q04BankBranch01.BnkBrcID;


    SELECT t01RelativeSub.ReltveID, t01RelativeSub.Relatn_ID01, t01RelativeSub.Employ_ID07, t01RelativeSub.NameSurname01, t01RelativeSub.PhoneNum07, t01RelativeSub.EmlAdr08, t01RelativeSub.WorkPhoneNum01
    FROM t01RelativeSub;

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,418
    I'd be surprised if the first query is updatable - too many joins and referencing other queries. Would need to check but if the main form is not updateable, that property would be passed to the subform. You might also check the main form properties as well

  8. #8
    Perfac's Avatar
    Perfac is offline Expert
    Windows 7 64bit Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Frustrating when solutions happens this way, but I recreated t01Employee and q01Employee, so the subform f01RelativeSub updates in f01Employee, and working perfect, even though I don't know why the problem occurred initially. I also store information of cutomers's RELATIVES. So the same table is used to create query q01RelativeSubCus. In f01Customers I therefore attach f01RelativeSubCus. The master and child links have to be right because the correct data display. I still try to find out why f01Employee mainform and f01RelativeSubEmp works successful, but not f01Customer mainform and f01RelativeSubCus.

    Is it possibly to do with the 2 queries using the same table as source?

  9. #9
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,418
    Is it possibly to do with the 2 queries using the same table as source?
    I don't see why not

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

Similar Threads

  1. Why does one file work and the other one fail
    By Lou_Reed in forum Access
    Replies: 2
    Last Post: 03-15-2017, 04:52 PM
  2. Form help - field update fail
    By nicole.skeeters in forum Forms
    Replies: 3
    Last Post: 07-22-2013, 11:13 AM
  3. Replies: 1
    Last Post: 11-07-2012, 05:31 PM
  4. Replies: 1
    Last Post: 03-10-2012, 07:34 AM
  5. Update field in table after update on a subform
    By jpkeller55 in forum Queries
    Replies: 3
    Last Post: 09-30-2010, 08:02 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