pass data between tab

Posted by Admin on 07-Oct-2009 02:14

hi..i have a problem here..i try to pass data from my browse (in Inquiry tab) to fill-in (in Company tab)..every time i click at that browse,then i need to click at Company button (big button) to pass data..actually,i just assign to global variable (define in Inquiry and company form)..then when it open Company tab, it will pass the data from browse to Company field in Company tab..the problem is, only certain record can pass to Company field..i try to delete all records and create back,but still can't solve the problem..

please help me..thanks in advance..

Main Form

ON CHOOSE OF b_Company IN FRAME fMain /* Company button */          
DO:
RUN selectPage(3).

END.

Inquiry Form

/* ***************************  Definitions  ************************** */

/* Parameters Definitions ---                                           */

/* Local Variable Definitions ---                                       */

{src/adm2/widgetprto.i}


DEFINE NEW GLOBAL SHARED VARIABLE Comp AS CHARACTER NO-UNDO.
DEFINE NEW GLOBAL SHARED VARIABLE Grps AS CHARACTER NO-UNDO.

ON VALUE-CHANGED OF myBrowse IN FRAME fmain
DO:
  ASSIGN comp = CompanyName:SCREEN-VALUE IN BROWSE myBrowse
         grps = Groups.GroupName:SCREEN-VALUE IN BROWSE myBrowse.

END.

Company Form

/* ***************************  Definitions  ************************** */

/* Parameters Definitions ---                                           */

/* Local Variable Definitions ---                                       */

{src/adm2/widgetprto.i}


    DEFINE NEW GLOBAL SHARED VARIABLE Comp AS CHARACTER NO-UNDO.
    DEFINE NEW GLOBAL SHARED VARIABLE Grps AS CHARACTER NO-UNDO.

ON ENTRY OF FRAME fMain
DO:
    FIND FIRST company WHERE company.companyNAME = comp NO-ERROR.
   IF AVAILABLE company THEN
      DO:

      FIND FIRST groups WHERE groups.groupname = grps AND groups.groupid = company.groupid NO-ERROR.
      IF AVAILABLE groups THEN
      DO:
          ASSIGN 
                          txtCompany:SCREEN-VALUE        =        Company.companyName            
                          txtGroup:SCREEN-VALUE          =        groups.GroupName    . 

      END.

      END.

END.

tabCompany.JPG

tabInquiry.JPG

All Replies

This thread is closed