Results 1 to 4 of 4

Thread: link 2 subforms

  1. #1
    Join Date
    Jan 2004
    Posts
    2

    Unanswered: link 2 subforms

    I have an unbound form which contains two subforms bound to queries. The main form is set up so that you can enter search criteria in the form, click a button and the results are displayed in datasheet view in subform1. What I would like to be able to do, is to double click on a record in subform1, and have data related to that record be displayed in subform2.
    Subform1 contains items such as drawing number, customer name, etc..
    Subform2 displays the drawing that corresponds to each drawing number.
    Hopefully this is clear.
    Thanks for any help i may receive.

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465

    Re: link 2 subforms

    Originally posted by philmccracken
    I have an unbound form which contains two subforms bound to queries. The main form is set up so that you can enter search criteria in the form, click a button and the results are displayed in datasheet view in subform1. What I would like to be able to do, is to double click on a record in subform1, and have data related to that record be displayed in subform2.
    Subform1 contains items such as drawing number, customer name, etc..
    Subform2 displays the drawing that corresponds to each drawing number.
    Hopefully this is clear.
    Thanks for any help i may receive.
    Hi....
    Do this:
    Make an intermediate field TextBox No Enabled, Yes Locked and Visible False (MyNumber) with ControlSource =[Formularios]![MyForm]![MySubform1]![DrawNumber].
    Link the Subform2 with the Subform1 in this way:
    LinkChildFields: DrawNumber
    LinkMasterFields:MyNumber

    In this way the subform2 show the drawing tha corresponds to the subform1 in automatic mode.
    I hope this help you.
    Saludos
    Norberto

  3. #3
    Join Date
    Jan 2004
    Posts
    2

    Re: link 2 subforms

    Thanks for the help, it worked perfectly. The syntax for the ControlSource was slightly different (ControlSource=[subform1].Form![field name]), but this put me in the right direction and I was able to figure it out from there. Thanks again.




    Originally posted by Norberto
    Hi....
    Do this:
    Make an intermediate field TextBox No Enabled, Yes Locked and Visible False (MyNumber) with ControlSource =[Formularios]![MyForm]![MySubform1]![DrawNumber].
    Link the Subform2 with the Subform1 in this way:
    LinkChildFields: DrawNumber
    LinkMasterFields:MyNumber

    In this way the subform2 show the drawing tha corresponds to the subform1 in automatic mode.
    I hope this help you.

  4. #4
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465

    Re: link 2 subforms

    Originally posted by philmccracken
    Thanks for the help, it worked perfectly. The syntax for the ControlSource was slightly different (ControlSource=[subform1].Form![field name]), but this put me in the right direction and I was able to figure it out from there. Thanks again.
    The syntax for ControlSource is ok you can use two form:
    [subform1].Form![field name]
    or
    [Formularios]![MyForm]![Subform1]![field name]
    is the same
    Saludos
    Norberto

Posting Permissions

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