Results 1 to 3 of 3
  1. #1
    RLehrbass is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2015
    Posts
    102

    Arrow refreshing a form instead of closing to update record.

    My form is not updating the table record until I actually close the form.
    Is there VBA code to refresh the record and leave the form open so I can perform other actions designated on the form?



    I tried the following but it did not store the record in the table: I still had to close the form or go to another record then return to continue???

    Private Sub cmdUpdateRecord_Click()
    On Error GoTo Err_cmdUpdateRecord_Click

    DoCmd.RunCommand acCmdRefresh

    Exit_cmdUpdateRecord_Click:
    Exit Sub

    Err_cmdUpdateRecord_Click:
    MsgBox Err.Description
    Resume Exit_cmdUpdateRecord_Click

    End Sub

  2. #2
    IrogSinta is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jun 2015
    Posts
    103
    If you want to get the latest changes to any of the values in the current records you are showing, you would add the following in your code:
    Me.Refresh

    If records to be displayed will be different because some have been deleted or new ones have been added or a different set now meet the criteria in your recordsource, you would use:
    Me.Requery

    Ron

  3. #3
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    try running this.

    Code:
            DoCmd.RunCommand acCmdSaveRecord

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 04-04-2013, 05:56 PM
  2. Replies: 1
    Last Post: 12-10-2012, 07:04 AM
  3. Replies: 1
    Last Post: 10-13-2012, 06:19 PM
  4. after DAO update, listbox.requery not refreshing
    By EuniceH in forum Programming
    Replies: 2
    Last Post: 10-21-2011, 04:16 PM
  5. Replies: 4
    Last Post: 05-17-2011, 06:56 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums