need to refresh subforms on unbound form

Posted on 2007-10-01
Last Modified: 2013-11-28
Good evening
I have a refresh problem.
I have an unbound form that has 5 tab controls. Each tab page has a subform that is generated from a query and has detail information pertaining to the main prospect information. such as call detail, to-do's and so on. Each subform record has a button control that takes the user back to the correct record on the main form and that is where the information is entered for the detail. After the user enters the data and closes the main form, the to-do (unbound form) is still open, currently none of the 5 subforms requery the data unless the entire form is closed and reopened. Is there a way to requery if the tabs across the top are clicked on, or a better way for the subforms to requery without too much work for the user? I tried a requery button on the unbound form but that didn't affect any of the subforms if i use a requery button on the subforms it is on every record in the subform, and looks terrible, not to mention it doesn't work anyway!
Hope this is understandable if more info is needed, please let me know
any help would be a help
Question by:NotEnoughTime
    LVL 19

    Accepted Solution

    where "frmSub" is the name you called your subform control in your main form.

    Author Comment

    please forgive my inexperience with coding / Macros,
    would I use the above in an event procedure for on got focus, after update, or another in the properties form or with a button on the unbound form that all the subforms are on and name all five of the subforms?

    Thank you
    LVL 19

    Expert Comment

    run that code from your main form where your subforms are in, in the afterupdate event of whatever control that links the 2 together (plus whenever you need it refreshed when you do something on your main form)
    note that "me" is the vb reserved word for the current form, use it  verbatim (as is)
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Suggested Solutions

    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now