Results 1 to 3 of 3
  1. #1
    gopherking is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2011
    Posts
    71

    Verify no Changes in Sub-Form before next record


    I have a form with a subform in it where users make necessary updates to fields as they need to. I have a Save and Cancel button where necessary so that users can save the changes they make to the record as they go along, but they don't always remember to click one or the other. I am trying to add in some code to check to see if any changes have been made on the Sub-Form before the user can go to the next record in the main form. By the way, the main only displays a single record at a time.

    Currently, I have tried to place some code in the On Exit and Lost Focus events for the Mainform, but they don't bring up any of the msgbox's I have in the code. Is there a specific event that would be best for this?

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Forms automatically save when you move between the parent form and subform as well as moving to a new record within the same form.

    So, you would need to use the subform's BEFORE UPDATE property to check for any changes and that will fire if you are in the subform and then click something on the main form.

  3. #3
    gopherking is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2011
    Posts
    71
    Thanks Bob, adding it to the Before Update worked, but I have run into other issues with my code that I didn't encounter before since it wasn't being called correctly. Unfortunately, I need to drop this issue to resolve some others right now and won't be able to look into it for some time. Thanks again for the response!

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

Similar Threads

  1. Verify values change before updating record
    By gopherking in forum Forms
    Replies: 6
    Last Post: 07-19-2011, 11:46 AM
  2. Verify this Query
    By dongodu in forum Queries
    Replies: 1
    Last Post: 06-21-2011, 11:08 AM
  3. Verify This Error
    By dongodu in forum Queries
    Replies: 3
    Last Post: 05-30-2011, 07:19 AM
  4. Verify state field
    By pwmichaelsr in forum Access
    Replies: 5
    Last Post: 08-16-2010, 12:49 PM
  5. Verify CSV Field Names Before Importing
    By johnson in forum Import/Export Data
    Replies: 2
    Last Post: 01-26-2010, 06:53 PM

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