Subject Two Forms - Passing data
From edward racht <e.racht@gmail.com>
Date Tue, 21 Oct 2014 15:48:19 -0400
Newsgroups dbase.getting-started

I have two forms.
HS.wfm data form and HSC.wfm lookup form.

I want the entry in the HS.wfm entryfield to be passed to the HSC entryfield when the pushbutton is clicked to open the HSC.wfm lookup form.

Should the data not be in the lookup HSC form table then it needs to be added.  At the moment, I have the lookup form with the editing toolbar and would edit/enter it there.

I can not figure out the following code to get the entry from HS.wfm to HSC.wrm.

         this.parent.CNCAT1.EN1CAT1.value := ;
this.parent.ERNOTEBOOK1.CNMD1.ENCAT1.value

At the moment I have the following code for the pushbutton onclick method below.

  FUNCTION PBC_onClick
      // Open the dBTEST Category form:
         set procedure to HsC.wfm additive
         form.cCAT = ""          // Initialize a form variable

         this.parent.CNCAT1.EN1CAT1.value := ;
this.parent.ERNOTEBOOK1.CNMD1.ENCAT1.value

         // Load the class into memory
         local f
         f = new HSCForm()

         f.top = form.top + form.height + 105
         f.left = form.left + 75

         f.parent = form      // Define HSC.wfm as a parent of HS.wfm
         f.mdi := false       // Ready for a modal form
         f.readModal()        // Open HSC.wfm in modal form

         close procedure HSC.wfm
         // After coming back from HSC.wfm, form.cCAT has
         // a value (assigned in HSC.wfm)
         form.ERNOTEBOOK1.CNMD1.ENCAT1.value := form.cCAT
         form.rowset.refreshControls()
RETURN

I realize I do not know what I am doing and need guidance.

Ed