save current record in VBA code

Discussion in 'Microsoft Access VBA Modules' started by emmy, Jul 8, 2003.

  1. emmy

    emmy Guest

    Hi there, I'd like to have a SAVE button on a bound form.
    When the user clicks on the button, the current record
    will be saved (if it's dirty), instead of having the user
    move to another record using the record navigator.

    Thanks a bunch!

    Emmy
     
    emmy, Jul 8, 2003
    #1
    1. Advertisements

  2. emmy

    Dirk Goldgar Guest

    "emmy" <> wrote in message
    news:055c01c34588$f77059b0$
    > Hi there, I'd like to have a SAVE button on a bound form.
    > When the user clicks on the button, the current record
    > will be saved (if it's dirty), instead of having the user
    > move to another record using the record navigator.


    If you really need to do this, you can write

    RunCommand acCmdSaveRecord

    or

    If Me.Dirty Then Me.Dirty = False

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     
    Dirk Goldgar, Jul 8, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Van T. Dinh

    Re: VBA code to print only one report using only the current record

    Van T. Dinh, Jul 25, 2003, in forum: Microsoft Access VBA Modules
    Replies:
    1
    Views:
    1,012
    Van T. Dinh
    Jul 25, 2003
  2. BobV

    Copy prior record into the current record

    BobV, Oct 9, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    6
    Views:
    6,654
    Allen Browne
    Oct 10, 2004
  3. Guest
    Replies:
    6
    Views:
    5,887
    Alex Dybenko
    Jan 18, 2005
  4. Guest
    Replies:
    2
    Views:
    303
    Alex Dybenko
    Apr 14, 2005
  5. Guest

    copy current record to new record in another table

    Guest, May 26, 2005, in forum: Microsoft Access VBA Modules
    Replies:
    5
    Views:
    1,524
    Guest
    Jun 6, 2005
  6. Guest

    Code writes to subsequent record instead of current record

    Guest, Aug 24, 2007, in forum: Microsoft Access VBA Modules
    Replies:
    3
    Views:
    364
    Stefan Hoffmann
    Aug 27, 2007
  7. tigercop

    Email a single record or current record from a report

    tigercop, Dec 17, 2007, in forum: Microsoft Access VBA Modules
    Replies:
    2
    Views:
    1,096
    Tony Toews [MVP]
    Dec 20, 2007
  8. Mani

    Code to append the current record from a form to a table

    Mani, Jan 31, 2008, in forum: Microsoft Access VBA Modules
    Replies:
    5
    Views:
    575
    Klatuu
    Feb 5, 2008
Loading...