Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004

    Question Unanswered: Joining with a sub2 and Main

    Is this possible and if it is it considered "bad architecture"?
    I have a form, lets call it FormA and FormA has a subform, named Subform1.
    FormA is going to be a subform of another form, FormB.
    I want to join these two fields by the subform1 field in FormA and FormB.

    If I had subform1 table into the query of FormA, it works but I get every subform record as a record in FormB.

    If I exclud subform1 table from the query, I am not able to link the two forms. How can I get around this?

  2. #2
    Join Date
    Dec 2004
    Madison, WI


    One method I used was to have an unbound text box on the "main" form (my forms were all unbound though). This unbound text box would have the record identifier or primary key populated from a listbox. I would then set the subform and sub-subforms underlying queries (the record identifiers) to equal the unbound text box on the main form/subform. Or have another unbound text box in the subform and have the sub-subform's underlying query (record identifier) equal to the subform's unbound text box. (hope that makes sense). This may seem like the long way of doing things but again, I used unbound forms and I could control what got populated in the unbound text boxes via listboxes (or comboboxes). The only form really bound was the sub-subform. Keep in mind that if you have a sub-subform, your subform will not be able to be continuous. There are some tricks to get around this though utilizing listboxes on the forms/subforms. If done correctly, you can make it seem pretty seamless.
    Last edited by pkstormy; 08-01-06 at 18:15.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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