Subject calling another form
From Bob McKinney <bmckinney@gmail.com>
Date Wed, 19 Sep 2018 14:21:10 -0400
Newsgroups dbase.getting-started

Hi All: Using dBplus 2.8 w/wn 10.  somehow while editing a form, whatever I did must have contaminate my [ dialog.cfm ] form.  I could not open the cfm.  I could open the source editor and look at the code, whatever that's worth. (grin).  Any form that came from dialog.cfm would not work.
    I deleted the current dialog and created a new dialog.cfm.  This did not help.  I am now recreating any forms that are called by another wfm form via a call button.
    Problem:  Using a pushbutton in the calling form (New Register, 1st sample code below) , it will open "CheckEdit.wfm" with data in the entryfields rather than blank (Append Mode).  see code below.  
I hope someone will decipher all this and ginve this old brain some help...…..Bob

  function PBADD_onClick
       // Get the Vendor name & Numbr for the Remind section in checkedit.wfm
      _app.Vendor  = form.rowset.fields[ "Vendor" ].value
      _app.VendNo  = form.rowset.fields[ "VendNo" ].value
      local fcheck
      set procedure to checkEdit.wfm additive
      fcheck = new CheckEditForm()
      // add a custom property (note that the
      // form.rowset is pointing to the Vendor rowset
      fCheck.VendNo = form.rowset.fields[ "VendNo" ].value
      // Get the Vendor name & Numbr for the Remind section in checkedit.wfm
//      _app.Vendor  = form.rowset.fields[ "Vendor" ].value
//      _app.VendNo  = form.rowset.fields[ "VendNo" ].value
      do case
          case _app.VendNo == "193"
            msgbox("Protection One Automatically Pays from Visa")
          case _app.VendNo == "175"
            msgbox("Toyota's check MUST be mailed by the 5th of month"),("SPECIAL MESSAGE ")
              
      endcase
      // loading var for sending utility pmts to remind table
        if form.rowset.fields[ "Utility" ].value == true
          _app.remind = true
        else
          _app.remind = false
        endif
      // let the CheckEdit form know we're in the "Append" Mode
      fCheck.Mode = "Append"
      // Open the form
      fCheck.readModal()
      // close the procedure file..
      close procedure CheckEdit.wfm
      // refresh the controls on screen...
      form.perchecksdatamodule1.pchecks1.rowset.refreshControls()
      form.seeker1.setFocus()
      // cleanup
     _app.Vendor = null
//     _app.Remind = null
      return

******************

Begining code for checkEdit.wfm
** END HEADER -- do not remove this line
//
// Generated on 09/19/2018

local f
f = new CheckEditForm()
if (bModal)
   f.mdi = false // ensure not MDI
   f.readModal()
else
   f.open()
endif

class CheckEditForm of DIALOGFORM from :MyControls:dialog.cfm
   set procedure to :BMCustom:Mypushbutton.cc additive
   set procedure to :MySource:mycontrols.cc additive
   set procedure to :MyControls:PerChecks.dmd additive
   with (this)
      onOpen = class::FORM_ONOPEN
      height = 549.0
      left = 3.0
      top = 40.0
      width = 584.0
      text = "CheckEdit/Add"
   endwith

   this.PERCHECKSDATAMODULE1 = new PERCHECKSDATAMODULE()
   this.PERCHECKSDATAMODULE1.parent = this
   with (this.PERCHECKSDATAMODULE1)
      left = 497.0
      top = 418.0
   endwith

   with (this.TITLETEXT)
      text = "Check/Visa -  Edit/Add form"

*********

Many thanks in advance......bob