Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2005
    Posts
    5

    Unanswered: Creating a form controlled by multiple fields -

    Hi all. I'll attach my current db file to help clarify my problem.

    On my form called tblCase, All the information relating to a case is displayed.
    What i would like is for the user to:

    --select a case and see a list of invoices relating to that case (this works)

    --select an invoice from the above list and see a list of invoice details relating to the selected invoice (this doesnt work)

    How do i go about doing this so that CASEID controls the INVOICE subform and INVOICEID controls the INVOICEDETAILS subform?

    Many thanks in advance.
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Make the invoice detail form a subform of the invoice form and link them on the invoice ID.

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yep... I would have a button on the invoice subform that calls up the invoice in a separate mainform -- along with all it's details.

    The invoice mainform just needs an underlying recordset that queries out the InvoiceID that is the current record.
    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

  4. #4
    Join Date
    Nov 2005
    Posts
    5
    Thanks for the replies guys.

    How do i make a subform thats controlled by another subform though? I'm using access 2007 and the wizard is not giving me the option of using the invoice subform to control the new invoicedetails subform.

    Thanks

  5. #5
    Join Date
    Nov 2005
    Posts
    5
    Ok guys i think there was a minor problem with something i'm not sure what but it seems to work now. I can change CaseID to view different Cases and change INvoice ID to view different invoice details. THanks for your help.

    A quick query for you regarding printing current records. I had a button set up using the code:

    DoCmd.OpenReport "rpt1del", acViewPreview, , "[CaseID] = " & Me![CaseID]

    This displayed all invoices for each case. My question is, how can i adapt this so that it sends the current invoice's details to the report? I did try changing the values in the code but to no avail. Thanks

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    DoCmd.OpenReport "rpt1del", acViewPreview, , "[InvoiceID] = " & Me![InvoiceID]

    If I understand what you want here......
    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
  •