Results 1 to 4 of 4
  1. #1
    sireesha is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    50

    how to stop automatically save option for master/child forms in access 2007

    how to stop automatically save option for master/child forms in access 2007.depending on condition only it saves. my child form/subform is in datasheet view.
    i write a code in vba for required fields . if required fields entered only save the record otherwise don't save.


    if access is not saved data automatically my code works.

    So Please Help Me.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You would have to issue a Me.UnDo in the BeforeUpdate event of the SubForm.

  3. #3
    sireesha is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    50
    Quote Originally Posted by RuralGuy View Post
    You would have to issue a Me.UnDo in the BeforeUpdate event of the SubForm.
    In the subform, only enter and exit events are there. there is no beforeupdate event.

    i had given me.undo in beforeupdate event but its not working.

    i had tried validation check i.e., isnull(fieldname)=true in form_beforeupdate it gives errors. so i changed code to save button. it works fine. but the problem is access saves data automatically. if this option works, using my code save the records into table. Please help me as early as possible.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Me.UnDo in the BeforeUpdate event of the SubForm (not the SubForm control) *will* keep the SubForm from creating records.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-14-2011, 02:50 PM
  2. Stop auto save of forms
    By shanky365 in forum Forms
    Replies: 2
    Last Post: 07-28-2011, 08:37 AM
  3. Replies: 1
    Last Post: 01-04-2011, 05:04 AM
  4. 2007 forms with tabbed interface option
    By Syswizard in forum Forms
    Replies: 4
    Last Post: 12-06-2010, 12:31 PM
  5. Master/Child between Subforms
    By Pilotwings_64 in forum Forms
    Replies: 3
    Last Post: 08-22-2010, 01:45 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