Results 1 to 4 of 4
  1. #1
    Evans2 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jul 2014
    Location
    Seattle
    Posts
    27

    Requery split form data button

    Hi all,

    First let me say that the help/knowledge I've received on this forum has been a life saver.

    I've got a split form used by multiple users throughout the day. I've got a refresh button that I thought would refresh all data entered and bring the split form up to date by showing new entries. What it does is actually just refresh currently shown data. New entries are only shown when the database is closed and reopened.

    Through searching, I've discovered that I need to requery the data to show new entries not just refresh. My question is, how can I link this to a requery to a button so that the user can simply click to show all new entries without closing and reopening the database.

    Screen shots below show the database skipping a number (not refreshing new entries after refreshing) and displaying new entries after reopening.
    Attached Thumbnails Attached Thumbnails DatabaseNotRefreshing.jpg   DatabaseRefreshedAfterClose.jpg  

  2. #2
    Evans2 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jul 2014
    Location
    Seattle
    Posts
    27
    I jumped the gun and figured this one out myself. Thanks!

  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
    Quote Originally Posted by Evans2 View Post

    ...I've got a refresh button that I thought would refresh all data entered and bring the split form up to date by showing new entries...
    Refresh is probably one of the most misunderstood methods in Access, even by experienced developers! As you've found out, it merely shows changes made to those Records that were a part of the RecordSet when the Form first opened. It does not show New Records, nor exclude Records that have deleted, since the Form opened.

    It's always good when you can solve a problem yourself, but forum etiquette requires that you post the solution. In this way, your solution may help others who find this thread, seeking an answer to the same question.

    Good luck with your project!

    Linq ;0)>

  4. #4
    Evans2 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jul 2014
    Location
    Seattle
    Posts
    27
    Hi Linq,

    I used this requery code in the on-lick event in the form properties: Me.Requery

    I also used the following last record code so that when the user clicks on the refresh button, they will also be taken to the last entry in the database: DoCmd.GoToRecord acDataForm, "Form Name", acLast

    Screenshot below. Thanks again for the help. Much appreciated!

    Click image for larger version. 

Name:	Requery.jpg 
Views:	9 
Size:	19.6 KB 
ID:	18067

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

Similar Threads

  1. Replies: 1
    Last Post: 05-26-2014, 10:31 AM
  2. Split Form frozen after requery
    By casinc815 in forum Forms
    Replies: 4
    Last Post: 04-23-2014, 11:14 AM
  3. Split Form For Data entry
    By OneToLearn in forum Forms
    Replies: 3
    Last Post: 10-22-2012, 01:49 PM
  4. Code to sort data shown on a split form
    By meissnerb in forum Programming
    Replies: 1
    Last Post: 05-03-2012, 04:34 PM
  5. Referencing split form data / filter
    By stephenaa5 in forum Programming
    Replies: 2
    Last Post: 09-14-2010, 08:48 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