Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Brugge, Belgium
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Alternative for DoCmd DomenuItem (MS ACCES 2007)

    In my MS Access 2.0 version database i used the following commands:
    DoCmd DoMenuItem A_FORMBAR, A_EDITMENU, A_UndoField, , A_MENU_VER20

    and

    DoCmd DoMenuItem A_FORMBAR,A_FILE, A_SAVERECORD, , A_MENU_VER20

    I've heard that in MS Acces 2007 the DoCmd DomenuItem is only kept for compatibilty.
    What are in MS ACCESS 2007 the equivalents for these two commands ?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Alternative for DoCmd DomenuItem (MS ACCES 2007)

    You can use

    RunCommand acCmdUndo

    and

    RunCommand acCmdSaveRecord

    See Converting DoMenuItem to RunCommand for an overview.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Alternative for DoCmd DomenuItem (MS ACCES 2007)

    You can also use Me.Undo to undo changes to current record on a form.

    If you use RunCommand acCmdSaveRecord, you should first do a call to your Form_BeforeUpdate event (if you have one) just in case, something lik this:

    Dim Cancel as Integer

    Form_BeforeUpdate Cancel
    If Cancel = True then
    Exit sub
    else
    Runcommand accmdSaveRecord
    End If
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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