Variable To Equal Subform Selection

NevetsNevets Member Posts: 2
Really basic question.

If I set a global variable on a form, called say Variable1. And on my form I have a subform control called say Subform1. How can I make it so that when someone select a record from my subform, that Variable1 := Subform1."Field Name".

As you can see in the pic below, I want the text field (Source expression = Variable1) to show the contract no selected in the subform.

Dont laugh, im new.

Comments

  • hxrhxr Member Posts: 20
    Hi,

    try this

    CurrForm.SubFormName.FORM.GETRECORD(SubFormRec);
    Variable1 := SubFormRec."Field Name";

    Or
    See how Sales or Purchase Invoices forms are made,
    when you select menu button Lines > Dimensions..

    hxr
Sign In or Register to comment.