Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Warrington, Cheshire, England
    Thanked 0 Times in 0 Posts

    Undoing record (Access 2003)

    I have an EmployeeDetail main form with an embedded RemunerationHistory sub-form. On the main form, I have a command button to undo the record if a mistake is made. This works OK. I used the command button wizard to write the code and the relevant line which does the business is :

    DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70

    However, if the user enters some data in the RemunerationHistory sub-form and then realises there's a mistake and tries to undo the entries using the same command button, Access generates an error "The command or action 'Undo' isn't available now".

    What is needed in order to allow the user to undo errors in the sub-form, please? The sub-form has its 'Default View' property set to Continuous Forms.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Undoing record (Access 2003)

    One option would be to put an Undo button in the subform (for example in the form header or footer; if you put it in the detail section it'll be displayed in each record).

    If you want the button on the main form to undo changes in the main form *and* in the subform, you'll need code. You can find a demonstration of how to do this in the Microsoft Access 97 Sample Forms database from Microsoft.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts