Three Table Boxes on a form

slmaluwaslmaluwa Member Posts: 364
hi there

I am trying to create a header/details type form with three tablebox (or subform) in a main form. ex:

TB1: list filtered records from Customer table. and User selects one record
TB2: List all the Posted Invoices belong to the above selected customer. User selects one Invoice
TB3: List all items (Sales Line) belongs to the above selected invoice.

I have already created 3 forms (lists) for the above record types and put on the mail form.

But, i don't know how to link these sub forms to achieve the functionality I need.

Can someone help me with a sample??

Regards

Maluwa
"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."

Answers

  • SavatageSavatage Member Posts: 7,142
    Doesn't nav already do this?

    Go tot the customer card - there are several ways of seeing the posted invoices for that customer & then seeing the invoice & lines.
    :whistle:

    & the Navigate button!
  • slmaluwaslmaluwa Member Posts: 364
    Thanks for the reply.
    Yes, but, this is a specific requirement for the client to bring them to one screen for auditing purposes.
    Also, I am trying to learn how to link and manipulate subforms in this way.

    Can you please help me?
    "A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
  • SavatageSavatage Member Posts: 7,142
    one way of quickly getting to the header & lines of a document is you could add to the OnLookup trigger of the Document No if the customer ledger entries (for example) - then with one click lookup it will bring you right to the doc you want.
      Name

    DataType
    Subtype
    Navigate
    Form
    Navigate
    PostedSalesForm
    Form
    Posted Sales Invoice
    PostedCreditForm
    Form
    Posted Sales Credit Memo
    PostedPaymentForm
    Form
    Posted Deposits
    PostedSalesInv
    Record
    Sales Invoice Header
    PostedCreditInv
    Record
    Sales Cr.Memo Header
    CLE
    Record
    Cust. Ledger Entry
    PostedPaymentInv
    Record
    Posted Deposit Header
    OnLookup(VAR Text : Text[1024];) : Boolean
    CASE "Document Type" OF "Document Type"::"Credit Memo":
     BEGIN
        CLEAR(PostedCreditForm);
        PostedCreditInv.SETFILTER(PostedCreditInv."No.","Document No.");
        PostedCreditForm.LOOKUPMODE(TRUE );
        PostedCreditForm.SETTABLEVIEW(PostedCreditInv);
        PostedCreditForm.RUNMODAL;
     END
    END;
    CASE "Document Type" OF "Document Type"::Invoice:
     BEGIN
        CLEAR(PostedSalesForm);
        PostedSalesInv.SETFILTER(PostedSalesInv."No.","Document No.");
        PostedSalesForm.LOOKUPMODE(TRUE );
        PostedSalesForm.SETTABLEVIEW(PostedSalesInv);
        PostedSalesForm.RUNMODAL;
     END
    END;
    CASE "Document Type" OF "Document Type"::Payment:
     BEGIN
        CLEAR(PostedPaymentForm);
        PostedPaymentInv.SETFILTER(PostedPaymentInv."No.","Document No.");
        PostedPaymentForm.LOOKUPMODE(TRUE );
        PostedPaymentForm.SETTABLEVIEW(PostedPaymentInv);
        PostedPaymentForm.RUNMODAL;
     END
    END;
    
  • SavatageSavatage Member Posts: 7,142
    Also take a look at this download
    It's a multiple subform sample
    http://www.mibuso.com/dlinfo.asp?FileID=290
  • slmaluwaslmaluwa Member Posts: 364
    Thank you

    I was able to learn and solve the problem using the download mentioned
    "A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
Sign In or Register to comment.