Results 1 to 6 of 6
  1. #1
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    528

    Refresh button in form

    Hi guys


    how do I add a refresh button to the form I used this code
    DoCmd.RefreshRecord
    and
    Me.Refresh
    but not working any solutions
    thanks

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    What event have you placed the code in? Try ON CURRENT.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    What, exactly, does 'not working' mean? Are you getting an error message?

    What, in plain language, are you trying to accomplish?

    The Refresh method is designed to allow you to view changes that have been made to the current Recordset, by another user in a multi-user environment, since you loaded your Form. It only shows changes made to Records that were in the Recordset when you loaded the Form. It won't include Records that have been added or exclude records that have been deleted since the Form was loaded. To do that you have to Requery the Form.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    528
    Yes
    Matcol true Missinglinq
    I can not see to update the records, except in the case of the closure of the form and re-open it again
    This is what happens
    Thank you

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,952
    As Linq said, Refresh only shows changes to records already in the form RecordSource. Use Requery to retrieve new records created by other users or by code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    528
    Hi
    I put a button on a form is closed and opened at the same time

    Something like this
    Private Sub Command124_Click()

    DoCmd.Close
    DoCmd.OpenForm "frmStudent", acNormal
    End Sub

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

Similar Threads

  1. Refresh button
    By Kat-ness in forum Forms
    Replies: 2
    Last Post: 05-01-2013, 08:37 PM
  2. Refresh Button creating a new record?
    By mejia.j88 in forum Programming
    Replies: 9
    Last Post: 05-31-2012, 11:27 AM
  3. The Refresh Button....?
    By djclntn in forum Forms
    Replies: 10
    Last Post: 01-03-2012, 05:32 PM
  4. Refresh Button
    By JayX in forum Access
    Replies: 1
    Last Post: 12-16-2011, 10:16 AM
  5. Replies: 3
    Last Post: 02-14-2011, 02:18 PM

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