Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Wikltshire UK
    Posts
    152
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Hi,

    Just wondering if anyone can Clarify something for me, when you use the _exit event in VBA on an access form, is any associated code run from within the relevant field before the field is exited ie ie moves to the next field. I'm running a form in database mode and need to understand how the Arrow keys relate. So for example if you move to the next record IE go down if you were to DoCmd.RunCommand acCmdSaveRecord does that save the record its now in or the field in the record above?

    Hope thats clear, if not I'll try to illustrate it a bit better

    TX Graliv

  2. #2
    New Lounger
    Join Date
    Dec 2009
    Location
    Phoenix, Arizona, USA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I like to add a note.

    When the record is edited, Access sets the "dirty flag". Meaning that regardless of the field edited, the entire record is "dirty". Therefore any command to save will save the record and clear the dirty flag.

    Hope this helps.

    Microbus

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Quote Originally Posted by graliv1 View Post
    So for example if you move to the next record IE go down if you were to DoCmd.RunCommand acCmdSaveRecord does that save the record its now in or the field in the record above?
    If you use the Arrow Keys to move down, the record you have just left will be Saved automatically without using any code.

    In datasheet mode, you will see a pencil at the left. This indicates that the record is dirty. As soon as you move to another record the arrow will go away - this tells you the changes have been saved.
    Regards
    John



  4. #4
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Wikltshire UK
    Posts
    152
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Ahhh, Dirty Records!!

    OK thank-You that clears it up in my mind, I had a small bug in the code but I've resolved it elsewhere and thought the Exit Behavior could be the Culprit.

    Apologies for the slow response.

    Graliv

Posting Permissions

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