Requerying subforms in tab controls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jenni

    Requerying subforms in tab controls

    I currently have a query that is joining two distinct pools of
    information and turning them into one records with a unique identifier
    This query is dependent on criteria passed from a form in a number of
    text and combo boxes. This part of the form works fine.

    On Open a Tab control is displayed but the subforms in each of the
    three tabs are hidden until the required info is gathered from the
    user. The subforms are then displayed, emphasis given to the first
    tab which can display a number of records. What I want this tab
    control to do is display the other tabs, the information pertaining
    only to the record selected in the first i.e. setting some kind of
    filter to say that [ID2]= Forms!MainForm! Subform.Form!Co ntrol.

    I have tried this in two ways, neither of which have been completely
    successful. The first tab is based on the same query as the main form
    and returns all the records that match. The second tab is based on
    the same query with a filter something like that above - no joy.

    Secondly I replicated the query and merely added and additional query
    like the filter above. This does produce the required result for the
    subform cannot be requeried so as users flick through the available
    records on the first tab, the second tab remains on the initial record
    unless Shift+F9 is used.

    I have tried The Requery Statement Forms!Mainform! Subform.Form.Re query
    is the OnCurrent event of the first tab, the AfterUpdate event of a
    control on this tab, the onCick event of the second tab top and
    finally I tried passing the ID to a text box in the main form and then
    requerying on the AfterUpdate event of this control - nothing
    requeries the form other that Shift+F9. So I tried the Send Keys
    commands on all of the above Events and again nothing.

    I an absolutely 100% stumped and about 5 minutes away from scrapping
    and starting again. Hopefully someone has some dawning inspiration.

    P.S I have tried experimenting with the syntax of both the Requery
    statement and filter but according to both here and the help, as is
    should be fine.

    Thanks in advance for any help

    Jenni
Working...