Results 1 to 4 of 4

Thread: Subforms

  1. #1
    Join Date
    Jul 2004
    Posts
    11

    Unanswered: Subforms

    Hi,

    I want to create a main form with two subforms from the following tables:

    1. tblVendors: PK VdrID link to tblOrders: FK VdrID

    2. tblOrders: PK OrderNbr link to tblInvoice: FK OrderNbr

    3. tblInvoice: PK VdrID + InvNbr link to tblPayment: FK VdrID + InvNbr

    The field "invnbr" is not available from the parent/child dialog box for me to link the subform payment to subform invoice. I can select only the VdrID to link to the subform invoice.

    Do anyone know how I can get the field "InvNbr" to display in the parent/child dialog box in the payment form?

    Thank you.

    dbforums098

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Why does tblInvoice have a composite key?

    IF the fields are present in the forms, you can just enter it into the Child and Master properties of each subform object. The fact that the wizard doesn't let you choose the field indicates a bit of a structural problem though... you might want to check that out.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jul 2004
    Posts
    11
    Thank you, StarTrekker for replying to my post. I have to use a composite primary key on the invnbr field because sometime I have invoices with duplicate invoice number from different vendors. The composite primary key therefore make the invoice number unique. Example: Vendor A invnbr 123,
    Vendor B invnbr 123 etc.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Oh ... I see.

    Have you made any progress?

    The field "invnbr" is not available from the parent/child dialog box for me to link the subform payment to subform invoice. I can select only the VdrID to link to the subform invoice.
    Since you are using a composite key to join payments to invoices, I think you might need to do this manually yourself rather than relying on the wizard.

    What version of Access are you using here? I'm not sure you can link a subform to a subform. You normally link subforms to mainforms.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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