prob. in adding emp names (in form2) into the textbox(form2)

srinivas.chittemsrinivas.chittem Member Posts: 142
Hai,

First of all i would like thanks to u all for spending your valuable time here..

here i have small problem...

i have two forms 1)Form 1 2) Form2 (subform)

form1 having a TextBox of length 250. In Form2 i am displaying employee table..

Employee table having employee names ..Problem is ..when ever the form is opened i would like to display all the empolyee names in the subform into the textbox(Located in main form)

i tried this one but i failed to display all the employee names...But here when i opened a form Last employee name displayed..

Is there any function to concatenate one name followed by another...??
or any Code? please share ur Views..................

Give me the solution if possible code..
Regards,
srinivas
"Delighting Customers.... Through Delivery Excellence" .

Comments

  • kinekine Member Posts: 12,562
    1) I recommend to fill the variable with the names "on request" - it means e.g. by some button or menu item.
    2) Than you can add code OnPush which will get the values from the subform and will fill the variable on the main form.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ufukufuk Member Posts: 514
    You can write a function to the subform like:
    IF FIND('-') THEN BEGIN
      EmpNames := '';
      REPEAT
        EmpNames += Code + ' ';
      UNTIL NEXT = 0;
      EXIT(COPYSTR(EmpNames,1,250);
    END;
    

    Use this function in the sourcexp of your textbox like:
    CurrForm.SubForm.FORM.GetEmpNames
    
    Ufuk Asci
    Pargesoft
Sign In or Register to comment.