Results 1 to 6 of 6
  1. #1
    Mahavir is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    12

    Exclamation Message Box for Saving Record


    hey guys i want to have message box asking "Want to save the record or not" to save the record.

    form contain the subform also. i read some thread regarding that issue they suggest i have to use form's beforeupdate property. i used it for the main form but message box is appearing before entering the values in subform. i mean i have to enter some data in subform also.

    i am attaching database for ur references. after entering PO nunber PO date and selecting client message box is apearing but it should be come after updating data in subform i.e. details.

    kindly help me and guide accordingly.

  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
    The mainForm will attempt to save the Current record (if it is Dirty) as soon as you try to move the focus to the SubForm.

  3. #3
    Mahavir is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    12
    pls give some example....

    Quote Originally Posted by RuralGuy View Post
    The mainForm will attempt to save the Current record (if it is Dirty) as soon as you try to move the focus to the SubForm.

  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
    If you re-read my post you will see that what you are getting is the expected behavior of Access with a Form/SubForm arrangement. You have the example.

  5. #5
    Mahavir is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    12

    Exclamation

    i got ur point but i am just asking u that which event of which form either mainForm or subform i have to select to put my code for saving the record after asking the user through message box.


    Quote Originally Posted by RuralGuy View Post
    If you re-read my post you will see that what you are getting is the expected behavior of Access with a Form/SubForm arrangement. You have the example.

  6. #6
    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
    The BeforeUpdate event is the correct event but you have two, one in the MainForm and one in the SubForm. Not saving the MainForm recortd until you have SubForm records is a more complicated problem.

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

Similar Threads

  1. Replies: 6
    Last Post: 04-13-2011, 03:55 PM
  2. Saving over a query
    By dssrun in forum Programming
    Replies: 2
    Last Post: 03-21-2011, 08:26 AM
  3. Replies: 1
    Last Post: 01-12-2011, 10:11 AM
  4. Saving Record
    By mwabbe in forum Programming
    Replies: 12
    Last Post: 09-15-2010, 12:09 PM
  5. record saving twice in table
    By ds_8805 in forum Forms
    Replies: 15
    Last Post: 04-14-2010, 07:16 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