• Understanding events

    Author
    Topic
    #495536

    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?

    Viewing 2 reply threads
    Author
    Replies
    • #1459432

      The OnCurrent event occurs when moving from record to record

    • #1459448

      Thank you Patt. The OnCurrent is a form event. So I take it no event is taking place in the LastName control.

      • #1460129

        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

    • #1459451

      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.

    Viewing 2 reply threads
    Reply To: Understanding events

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: