Results 1 to 2 of 2
  1. #1
    Meanfish is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    3

    Update ControlField for Subforms on Load

    Hey Guys and Gals,

    I've been working with Access 2007 for about 2 1/2 weeks now, Here is my question.

    I have a Form 'Test Sales History' with 2 subforms 'Sales History Totals subform' and 'Sales History subform', that are controlled by a combo [Combo31] in the header, all works beautifully.

    What I am trying to get to work, is.... When coming from another Form I have [Combo31] updated with the Membership Number from the previous form, and that works great.

    What isn't happening is.... I want the subforms to load/update/refresh when that is done. When I hit 'ENTER' The records are shown in the subforms, however I need that 'ENTER' action to happen automaticly.

    Here is the code I have for bringing in the Membership Number to the control ComboBox, the SearchforRecord in on the AfterUpdate and KeyPress events on the ComboBox

    Private Sub Form_Current()
    If CurrentProject.AllForms("NewViewEditMembership").I sLoaded Then


    [Combo31] = Forms![NewViewEditMembership]![Membership Number]
    ***Guessing I need a requery/reload subforms action thing in here****
    End If
    End Sub

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    If your first form is handling new data you will likely need to use

    Me.REFRESH

    BEFORE you do the second step which is to REQUERY and combo boxes, subforms, or forms based on queries

    to requery a subform or combo box you would simply do something like:

    on the active form me.<objectname>.requery

    on another form forms!<formname>!<objectname>.requery

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

Similar Threads

  1. load and next buttons
    By landog in forum Forms
    Replies: 2
    Last Post: 10-07-2012, 01:01 PM
  2. Northwind - how to load
    By KHill in forum Access
    Replies: 4
    Last Post: 07-10-2012, 07:37 PM
  3. Replies: 5
    Last Post: 02-08-2011, 11:17 AM
  4. Query on start up / load
    By KEVWB in forum Access
    Replies: 11
    Last Post: 01-31-2011, 04:42 PM
  5. Load SQL results into an array
    By Tyork in forum Programming
    Replies: 8
    Last Post: 01-24-2011, 01:58 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