Options

Selecting Line from subform

rksaurabhrksaurabh Member Posts: 18
Hi,
I am creating a lookup for Item No. to select.The lookup open a form in which main form is item categorywise with subform as item list according to item group.Now the user has to select item from subform that has to come to the item No. #-o
can anybody help please?

Thanks in Advance.

Comments

  • Options
    devu_13devu_13 Member Posts: 101
    Hi
    Can u explain in easy way i cant recognise your problem... =;
    Devendra Kr. Sharma
    IBIZ Consulting Services,India
  • Options
    rksaurabhrksaurabh Member Posts: 18
    In purchase Order Requistion Form while selecting Itemno, instead of displaying item list form i am using main form and subform. Main form consists of Item category code and subform consist of item which is group as itecategory. Now i want to select item record from subform which should display in my purchase Order Requistion form.That's all.
    Can it be possible?
  • Options
    JPHSCJPHSC Member Posts: 67
    If understand you correct, perhaps something like

    in the subform, create a function : GetItemNo with code EXIT(rec."Item No.");
    in the form do also create a function GetItemNo with exit(currform.subform.form.GetItemNo));

    To call your form.
    form.lookupmode := TRUE;
    If form.runmodal = Action::LookupOK THEN BEGIN
    Item := form.GetItemNo;
    END;

    But it think the best way to do this is to make a new list form on the item table, and put a text box on it to filter the item cat. ? Write code in the triggers of the text box ?
  • Options
    rksaurabhrksaurabh Member Posts: 18
    But where to call this code from
    {
    form.lookupmode := TRUE;
    If form.runmodal = Action::LookupOK THEN BEGIN
    Item := form.GetItemNo;
    END;
    }
    and one more thing
    EXIT(rec."Item No.");
    it's saying that variable is expecting.
  • Options
    JPHSCJPHSC Member Posts: 67
    In the lookup trigger of the field !!

    ==> You will have to give your function ( both ) a return value Code 20
Sign In or Register to comment.