Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2012
    Posts
    108
    Provided Answers: 1

    Unanswered: Refresh Subform After Record Entry

    Hi all,

    Using Access 2013.

    After adding a record or modifying a record on a subform, I would like to refresh the subform so that the records are in reverse chronological order.

    The record source of the subform is a query.

    I can hit [F5] and that does the trick, but I prefer if the user did not have hit any keys or click any buttons.

    thx
    w

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    In the forms after update refresh the form data
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Feb 2012
    Posts
    108
    Provided Answers: 1
    Thanks Healdem,

    The name of the last field is DateAdded.
    In the AfterUpdate Event for DateAdded,

    Code:
    Private Sub DateAdded_AfterUpdate()
        Me.Parent.Refresh
    End Sub
    Appears to be working.
    Thanks for your help

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Put the refresh in the forms after update event NOT a controls afterupdate event
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Feb 2012
    Posts
    108
    Provided Answers: 1
    Thanks Healdem,

    I was thinking if I use the Form_AfterUpdate the subform would refresh after each field in the record changes?

    thx
    w

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    but you want the rows in reverse order... so you need to requery/refresh the the form containing those rows

    the afterupdate event fires after you have made changes to a control, but before the row is saved
    the afterupdate event in the form fires after the row is updated
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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