Results 1 to 8 of 8
  1. #1
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117

    Refresh control or form

    I have a data entry form with several controls and at any point in the entry process, a report may be needed to be printed which shows the data which has been entered so far.


    At the moment, for each seperate control I have the "me.refresh" event on After Update so this means that whatever control is being manipulated, it will always be updated and so appear on the report.
    Is this the best method, or is there another way of making sure that once data has been entered it will always appear on the report instantly.

  2. #2
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Personally, I prefer the code below set in the After Update event of each text box/combo box/etc.

    Code:
    DoCmd.RunCommand acCmdSaveRecord

  3. #3
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    Is there any difference in the result between your code and the me.refresh ?

  4. #4
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    The acCmdSaveRecord actually saves the record rather than just refresh the screen. It can replace the need for clicking the pencil in the Record Selector, thus making it removable if you do not need to delete records. It's just a more reliable way to ensure that the data is saved after updating an editable object on a form.

  5. #5
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    From a curiosity point of view, what would happen if I added the code in the AfterUpdate of the Form itself. Would that give a different result ?

  6. #6
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    I'm not sure since I've never tested it. I just put it in whatever text boxes I make available for edit that should be saved immediately so there are no updates missed.

  7. #7
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    OK thanks. How do I mark this as SOLVED

  8. #8
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    At the top of the thread, look under "Thread Tools".

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

Similar Threads

  1. Replies: 10
    Last Post: 02-20-2013, 07:04 AM
  2. Replies: 3
    Last Post: 03-29-2012, 12:40 PM
  3. Replies: 10
    Last Post: 03-29-2012, 10:44 AM
  4. Access 2010 Refresh VS Refresh ALL
    By Snwboarder1982 in forum Access
    Replies: 1
    Last Post: 09-09-2011, 04:07 PM
  5. refresh a form
    By RedGoneWILD in forum Forms
    Replies: 18
    Last Post: 09-03-2010, 08:31 AM

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