Results 1 to 5 of 5
  1. #1
    Tukayoo is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    5

    Question Continuous Form Update

    I have a continuous form that is a sub form. The record source for the sub form is a query. When a field on the main form is updated the query is updated to reflect the correct data, however, the issue I am running into is that the sub form's data does not update until I click on the refresh all button from the ribbon. Does anyone know how to get the form to update either by built in functions or by using VBA which would be preferable? The me.Refresh does not work. I have done both the following and it does not seem to update.



    Private Sub Form_Activate()

    Me.Refresh

    End Sub


    I have also tried this

    Private Sub Form_Load()

    Me.Refresh

    End Sub


    The sub from is in a tab and so I have also tried

    Private Sub TabName_Click()

    DoCmd.Requery

    End Sub

    Also this

    Private Sub TabName_Click()

    Me.SubFormName.Requery

    End Sub

    I am new to VBA so any help would be greatly appreciated.

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    me.requery ,updates ME, the MAIN form

    me.MySubform.form.requery, will update the subform

    (and its already updated, the code just refreshes the data)

  3. #3
    Tukayoo is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    5
    Quote Originally Posted by ranman256 View Post
    me.requery ,updates ME, the MAIN form

    me.MySubform.form.requery, will update the subform

    (and its already updated, the code just refreshes the data)


    So I think I had tried that, but the data in the continuous form does not update to reflect what is in the query. how do I get the form to reflect what is in the query?

    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Main form and subform bound to same data? You are trying to emulate Split form?

    The edit in main form must first be committed to table. Record is committed when: 1) close table/query/form; or 2) move to another record; or 3) run code to save.

    You don't show any code that commits record on main form. Did you try ranman's suggestion? The trick is figuring out what event to put code into.
    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
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    Try putting the Requery in the On_Current event as the On-Click event only fires when you initially click the Tab.

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

Similar Threads

  1. Continuous Split Form Update....
    By mrmmickle1 in forum Programming
    Replies: 3
    Last Post: 08-05-2016, 09:48 AM
  2. Replies: 1
    Last Post: 04-18-2016, 04:55 PM
  3. Replies: 13
    Last Post: 04-16-2014, 10:11 AM
  4. Replies: 2
    Last Post: 09-10-2013, 09:10 AM
  5. Query Update Criteria Continuous Form Row ID
    By andrebmsilva in forum Queries
    Replies: 2
    Last Post: 12-13-2012, 04:39 AM

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