Results 1 to 5 of 5
  1. #1
    lkates is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Healdsburg, CA
    Posts
    3

    Refresh subform in access 2010

    I have a calendar UI written in Access 2010 using only macros so i can eventually publish it on the web. It displays records in a TODO list. Each day on the monthly calendar has a subform based on a query with a where criteria which is a TempVar set by macros. The temporary variables are being set by macros fired when either the parent form is first loaded, or when the user selects a new date from a control on the parent. The first time the UI displays it all works very nicely, but i cannot get it to refresh the subforms when the user selects a new date. If i go out of the form and back in, the last date set shows, so the TempVars are being properly set. How do i refresh the subforms from a macro fired by an AfterUpdate event (or any other event) on the parent's control?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  3. #3
    lkates is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Healdsburg, CA
    Posts
    3

    Here is how i did it in macros:

    Since i have to use macros, i don't think i can use the VBA code from that site. Also, my subforms are not linked to the main form (Link Master Fields and Link Child Fields properties are blank). If they were linked, the update would be automatic, but that wouldn't work for this form. I actually solved the problem with two commands in the embedded macro for the contol After Update event:

    GoToControl
    Control Name [the name of the subform control on the main form]

    Requery

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Glad to hear your problem is solved.

  5. #5
    Join Date
    Jul 2012
    Location
    Indianapolis, IN
    Posts
    1
    GoToControl
    Control Name [the name of the subform control on the main form]

    Requery
    This didn't work for me, unfortunately. Perhaps settings in my database were interfering.

    However, a macro to browse to another form and then back to the original form got my subform to refresh.

    Click image for larger version. 

Name:	Test.png 
Views:	30 
Size:	23.9 KB 
ID:	8557

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

Similar Threads

  1. AfterUpdate event won't refresh subform!
    By Remster in forum Forms
    Replies: 16
    Last Post: 11-26-2010, 10:06 AM
  2. Replies: 15
    Last Post: 11-09-2010, 04:27 PM
  3. refresh subform
    By asmith in forum Forms
    Replies: 5
    Last Post: 09-27-2010, 10:58 AM
  4. Problems with subform refresh
    By Viggen66 in forum Queries
    Replies: 2
    Last Post: 02-23-2010, 04:07 AM
  5. My subform doesnt refresh????? HELP!
    By LiamMurphy in forum Forms
    Replies: 1
    Last Post: 03-09-2006, 09:08 PM

Tags for this Thread

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