Results 1 to 4 of 4
  1. #1
    harrytgs is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    38

    Set Access to automatically update

    You can just read the last paragraph - that has the whole question, the rest is just background!

    I am using Access 2007 and am making a pretty complicated database with a subform. This then sends some of the form names to the query which generates a report. All of this works fine except for one part. This is because there is a relationship shown below:

    DB1 DB2
    Ref No <-----> Ref No


    Branch Branch

    All the info is on DB1, and, once I enter the Ref on DB2 and close & reopen the form or go back and then forward records, the Branch automatically appears. The branch has to appear before the query works.

    Can I get Access to update the table (with the Branch) without having to close & reopen (or refresh by pressing F5, which also works) - maybe a macro that refreshes once the Ref No has been updated?
    Last edited by harrytgs; 08-03-2011 at 04:34 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    In the AfterUpdate event of the control (textbox?) maybe:

    DoCmd.RunCommand acCmdSaveRecord
    Me.Refresh
    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.

  3. #3
    harrytgs is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    38
    Thanks for your quick reply, june7!

    I have been trying to use the AfterUpdate - just realised that I am doing it on the form and not the textbox!

    Will try today and let you know.

  4. #4
    harrytgs is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    38
    This didn't work and kept erroring.

    I have fixed this by making a macro which sends the F5 key on Update and all is now working.

    Thanks for pointing me in the right direction!

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

Similar Threads

  1. Trying to Automatically update date within form
    By accesskid in forum Programming
    Replies: 4
    Last Post: 04-26-2011, 07:45 AM
  2. Automatically update field
    By Top Fuel Friday in forum Forms
    Replies: 3
    Last Post: 02-12-2011, 12:14 PM
  3. How to update fields automatically
    By kosan in forum Forms
    Replies: 1
    Last Post: 09-10-2010, 04:49 PM
  4. Automatically update datasheet
    By tammiep in forum Forms
    Replies: 1
    Last Post: 08-17-2010, 04:43 PM
  5. Help Automatically running and Update Query
    By JohnRandolphSTL in forum Queries
    Replies: 8
    Last Post: 04-13-2010, 02:08 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