Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    275
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Understanding events

    I have a simple form in Access 2013 that has controls for LastName, firstName etc. When the form is opened the first record of the table is displayed. If I use the navigation buttons on the bottom of the form to page through the records, what event if any occurs in, say the LastName control, as the data displayed in the control changes?
    Thanks
    chuck

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    Thanks
    0
    Thanked 23 Times in 23 Posts
    The OnCurrent event occurs when moving from record to record

  3. #3
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    275
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you Patt. The OnCurrent is a form event. So I take it no event is taking place in the LastName control.
    Thanks
    chuck

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    Thanks
    0
    Thanked 23 Times in 23 Posts
    In the lastname control, the change event gets called for each character keyed in, the BeforeUpdate event occurs after all changes have been made and the afterUpdate event is called after moving to another control. The before event gives you a chance to cancel the changes you made. There are probably others, eg the mouse movements etc.
    Right click on the control and see what events there are for the lastname control.

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,328
    Thanks
    1
    Thanked 13 Times in 13 Posts
    That's right, moving to another record will trigger the form's Current event for that record, but no control events will fire. If you wanted specific events to fire, you'd have to manually call them from your OnCurrent event; for example: me.txtLastName_AfterUpdate
    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
  •