Results 1 to 6 of 6
  1. #1
    Juicejam is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Feb 2011
    Posts
    44

    Updating main form on form that has a subform

    My main form uses data from a query and I run a macro with the gotorecord command to go to a specific record in the query thereby displaying the appropriate record. The query runs on a time event as the data in the underlying table changes often. The subform is linked using child properties and I have no problem with syncing the data from the query with the data in the subform.



    My problem comes when data in the underlying table changes. I cannot seem to get the main form to refresh whatsoever unless I close the form and reopen again. I've tried the requery and repaintobject commands.

    If anyone can help it would be a merry christmas... tks...

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    Show the time event code. Where have you tried the requery command?
    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
    Juicejam is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Feb 2011
    Posts
    44
    I am running a macro. The macro commands are as follows:
    Requery
    GoToRecord
    Requery

    This runs at 1009 timer event.

    Thanks very much for your help

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    I have never used timer events. Could you explain how you set this up and/or provide your project for analysis.
    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.

  5. #5
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    Add a Message Box somewhere in your Macro just to see that it is working as you expect.

    If it does can you test on a XP Machine. It may be a problem with Vista. I have experienced problems with Win 7 that do not happen in XP.

  6. #6
    Juicejam is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Feb 2011
    Posts
    44
    ok, got it to work. I converted the macro to code but I also had to add an extra line of code:
    me.recordsource=me.recordsource

    Apparently there is a bug in Access 2003 when using subforms (a post from another board). The code forces the query to refresh and voila!!!

    Thanks for all the help...

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

Similar Threads

  1. Replies: 35
    Last Post: 12-21-2011, 02:16 PM
  2. Replies: 1
    Last Post: 12-04-2011, 09:11 PM
  3. Replies: 5
    Last Post: 11-11-2011, 11:06 AM
  4. Updating Main form from a popup form
    By wdrspens in forum Forms
    Replies: 21
    Last Post: 06-13-2011, 01:34 AM
  5. Replies: 6
    Last Post: 11-05-2010, 10:11 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