Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    287

    Unanswered: Subform Requerying

    I have a Main form with a Tab subforms (4 subforms along each of the Tabs)

    I have a combobox at the top of the Main form that selects the Name and each Subform is running from a Query that is dependent on the Name selected on the main form.

    My question is how do I make it so that on the AFTERUPDATE selection of the combobox it auto requeries or refreshes all the subforms.

    I have tried the requery command but it doesn't work and errors.

    Any help woulkd be appreciated.

    Thanks,

    Neil

  2. #2
    Join Date
    Jul 2003
    Posts
    81
    try first to run the query of the datasource of its subform with the parent form opened. if no records then I think your problem is with the bound column of the combobox.
    Please inform me for the result.

  3. #3
    Join Date
    Mar 2004
    Posts
    287
    the subform query is running ok dependent on what the combobox shows so that part is ok but i need it so once the user clicks the combobox (or updates) then it auto updates the subform, whereas at the moment the old combobox selection is still being shown in the subform window but if i run the query with the new selection everything is fine>?!

    So I think I need an update/refresh/requery type command oin the afterupdate on the combobox sot hat the subforms will auto update with the selection from the combobox (when its changed)... how can i do this in code please?!

  4. #4
    Join Date
    Mar 2004
    Posts
    287
    right here's an update
    I believe the problem is due to the following setup;

    I have a MAIN form with Tabbed Subforms
    Some of these Tabbed subforms have other subforms from them... like this;

    MAIN -->

    TAB1
    TAB2 --> TAB2B
    TAB3

    The MAIN form has the combobox on and it requeries TAB1 which works fine. But i need the requery coding to requery TAB2B not TAB2 - that's where I think i'm going wrong, can you help please.

    I am using the docmd.requery "xxx" format
    but how do i do this for forms within forms???

    Thanks.

  5. #5
    Join Date
    Mar 2004
    Posts
    287
    surely someone know how to update a subform within a subform via code

    the docmd.requery doesn't work??? any ideas?

  6. #6
    Join Date
    Jul 2003
    Posts
    81
    is it possible to send me your mdb? I will try a requery procedure but I will also try ADO to filter the recordset of the subform its time you select a value from the cbox.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •