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:
    858
    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,041
    Allen Browne
    Oct 10, 2004
  3. Guest

    copy current record to new record in another table

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

    Code writes to subsequent record instead of current record

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

    Email a single record or current record from a report

    tigercop, Dec 17, 2007, in forum: Microsoft Access VBA Modules
    Replies:
    2
    Views:
    971
    Tony Toews [MVP]
    Dec 20, 2007
Loading...

Share This Page