Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    183

    Unanswered: subform filtered on other subform

    Its too late, its almost christmas, and I'm about to cough up a frog over this.

    I've got a form setup with 3 sub forms, two of them are statically bound, but the third is unbound by default.

    When pressing a specific button, one should receive one of 4 forms in the 3rd unbound form, but only showing records related to the record in one of the other forms.

    That is, the master field is within a subform... I've given up the object11.sourceobject = "details" and object12.linkmasterfields and coding the buttons to just assign object and linkmasterfields etc. Mainly because I cant get linkmasterfield to refer to another subforms fields... and I doubt that is possible.

    So what I need now, is a good tip on how to filter a subforms rowsource with a value from another subform. I just can't keep track of it all right now.. I need vacation.. sigh.

    /Trin

    Code:
        uo_skifter.SourceObject = "detaljer"
        Forms![Detaljer].FilterOn = True
        Forms![Detaljer].Filter = "Producent = " & Str(Me.uo_prod!txt_id.Value)
    this is pretty much what I want...
    Last edited by Trinsan; 12-19-05 at 10:21.
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    sidestepping your question ('cos i don't do filters)
    attached is a demo illustrating how you talk to subforms

    NOTE that the demo deliberately does not use the name of the .sourceobject form as the name of the subform control in the hope the distinction between the two names becomes clearer.

    (and what on earth was Mr Gates thinking of when he auto-default-names the subform control with the name of the first form you drag in! mad as a hatter!)

    izy

    LATER: added frmAnother to the demo
    Attached Files Attached Files
    Last edited by izyrider; 12-19-05 at 13:37.
    currently using SS 2008R2

Posting Permissions

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