Results 1 to 7 of 7
  1. #1
    bar891 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    20

    Query not updating anymore?

    I have a form with two subforms. the second subform used to update whenever i changed a value in subform one. Now it doesn't, even when i tell it to requery. I have to close & reopen for it to change. I have been on this for two days now & require help please.

    test.zip

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    I have never worked with an accdc file. You provided the frontend but no backend. The issue is form data refresh. Can't test without data.
    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
    bar891 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    20
    Sorry..... new to this. Try Now

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    I presume the form of issue is Expense Report Detail.

    Subform2 (Total Reports Subform) cannot refresh until data entry/edit of subform1 (Expense Reports Subform) is committed to table. Commitment happens when form closes, move to another record, or run code. As is, the only way you would see subform2 refresh is when moving to another record in subform1. That does work. Need code in subform1 event to commit data. This would likely have to be in the AfterUpdate events of Category and Cost fields.
    DoCmd.RunCommand acCmdSaveRecord

    Why even have the Total Reports Subform? Those calcs can be done directly on the main form. Just include all the Expense Reports fields in Query1 and use that query for the form's RecordSource. Change names of the calculated fields that have names conflicting with fields in table and adjust formulas. Do the Product Total calc in textbox instead of query, could actually do all the calcs in textboxes.
    SELECT [Expense Reports].*, [Total Quote]/11 AS ExpGST, [Total Quote]*0.3 AS ExpManagementFees FROM [Expense Reports];

    BTW, advise no spaces or special characters/punctuation (underscore is exception) in names.
    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.

  5. #5
    bar891 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    20
    I don't understand... On my system, Subform2 doesn't update when moving to another record in subform1. I can have a whole table records & subform2 stays on the same record. the only way it changes if i move to another record & return.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    I am running your db on Windows 7 and Office 2010 but I expect would get same behavior on Windows XP Office 2007. Subform2 calcs refresh when subform1 moves to another record. If this does not happen for you, can only think the form is corrupted.

    However, subform2 is entirely unnecessary as already noted although the same situation will apply. Run code to commit subform1 record.
    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
    bar891 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    20
    Thanks for your help. I have removed subform2 & have done calcs in textboxes & works....
    Many Thanks

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

Similar Threads

  1. Why Doesn't Stuff Work Anymore?
    By HowardOfOcal in forum Programming
    Replies: 4
    Last Post: 02-03-2012, 05:57 PM
  2. I can't add anymore items to drop down box
    By Mostiko in forum Access
    Replies: 5
    Last Post: 11-20-2011, 08:11 AM
  3. MS Access Query not working anymore.. help
    By pka4916 in forum Access
    Replies: 19
    Last Post: 10-10-2011, 07:29 PM
  4. Buttons Unclickable Anymore
    By netchie in forum Access
    Replies: 7
    Last Post: 09-14-2011, 11:06 AM
  5. Query decided it didn't want to be updateable anymore
    By tylerthompson in forum Queries
    Replies: 0
    Last Post: 07-23-2009, 09:43 AM

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