Passing variable from one form to another

KazanskyKazansky Member Posts: 10
Dear Gurus

here is my situation:

I am trying to auto populate form that Prints checks (Report 1401). There is a record in the original table GenJnlLine."Bank No." that I would like to pass to my Form so I go:
BankAcc2."No." := GenJnlLine."Bank No.";
(this is in request form-> C/AL code -> in Openform trigger. )

The value BankAcc2 in my form is still blank. Please help

Comments

  • kapamaroukapamarou Member Posts: 1,152
    Can you show us your code?

    It's hard to say... It could be the missing
    BankAcc2.MODIFY;
    
  • KazanskyKazansky Member Posts: 10
    kapamarou wrote:
    Can you show us your code?

    It's hard to say... It could be the missing
    BankAcc2.MODIFY;
    

    This is what I have in the (second) Report - On OpenForm()


    //- Populate Bank Account No. Begin
    BankAcc2."No." := GenJnlLine."Bank No.";
    //- Populate Bank Account No. End
    IF BankAcc2."No." <> '' THEN BEGIN
    IF BankAcc2.GET(BankAcc2."No.") THEN
    UseCheckNo := BankAcc2."Last Check No."
    ELSE BEGIN
    BankAcc2."No." := '';
    UseCheckNo := '';
    END;
    END;
  • SavatageSavatage Member Posts: 7,142
    Kazansky wrote:
    This is what I have in the (second) Report - On OpenForm()

    Not quite sure what you're trying to do - you mention "Report" then "On Open Form"

    are you trying to modify the report or form?

    If you want to set a default bank account - you can drill into the Batch Name and set the type Bank Account & Enter a Bank Account #.

    In fact you can create several batch names for different banks and set the default accounts for each one.
Sign In or Register to comment.