Hey Bob

The other guys have given you the best clue. It's ususally a
variable that needs to be defined.

Here is some code that will help..
You can connect to the db, run the vlist.rmd and it
will copy to the clipboard the list of variables that
are in the form and rearrange them into SET var blah = datatype.
It's pretty cool.

There are three files below.. save them as
vlist.rmd
lstvars1.rmd
lstvars2.rmd

The only requirement is there be a table in your database called
dummy and that it have one row populated with something.

Then connect to the database and run vlist.rmd
I think this is designed for Win RBase65 and above - haven't 
tested it lower though.


*(
--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-
    PROGRAM NAME: vlist.rmd

          AUTHOR: Jim Limburg
                  Tuftco Corporation
                  2318 Holtzclaw Ave, Chattanooga, TN 37404
                  Voice: 423-698-8601 Fax: 423-698-0842
                  email: [EMAIL PROTECTED] --business
                         [EMAIL PROTECTED] --home

         PURPOSE: Capture the variables needed to run a form.
                  Will set the clipboard to a list of SET VAR
                  statements that a form needs to have preset
                  before running

       IS RUN BY: Be connected to the database you are working
                  with and then type at R> prompt:  RUN vlist.rmd
                  Run the First Step and Quit. This will tell you
                  to Open the form in design mode -- Do this by
                  going to the Manager where reports,forms,and
                  tables are created and go to the forms tab and
                  click on (highlight) the form  you are working on
                  and click the design button. Immediatly close the
                  form (yes with doing anything) and then RUN vlist.rmd
                  again and choose the second option and Quit.
                  Now you can (paste) the SET VAR statements this
                  creates into your code pressing [CTRL] + [V] or
                  right click place you want the code to be placed
                  and choose paste, or choose paste from the menu
                  option you have in the program you are writing code
                  to.

         RETURNS: Sets the Clipboard to a list of variables
                  that can be pasted into your code before a form call.

    MODIFICATION HISTORY
             Created:   02/12/2002

 --=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-
 )

LABEL lbtop
CHOOSE vaction FROM #VALUES FOR ('1. Run Step One'), '1' FROM dummy +
UNION SELECT ('2. Run Step Two'), '2' FROM dummy +
UNION SELECT ('3. Quit'), '3' FROM dummy +
AT 15 CENTER TITLE 'Choose Next Action'
SWITCH (.vaction)
  CASE 1
    RUN lstvars1.rmd
    BREAK
  CASE 2
    RUN lstvars2.rmd
    BREAK
  CASE 3
  CASE '[Esc]'
    CLEAR ALL VAR EXCEPT vm_formname
    GOTO lbexit
    BREAK
ENDSW
GOTO lbtop
LABEL lbexit
RETURN

*(
--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-
    PROGRAM NAME: lstvars1.rmd

          AUTHOR: Jim Limburg
                  Tuftco Corporation
                  2318 Holtzclaw Ave, Chattanooga, TN 37404
                  Voice: 423-698-8601 Fax: 423-698-0842
                  email: [EMAIL PROTECTED] --business
                         [EMAIL PROTECTED] --home

         PURPOSE: Part of the vlist.rmd -- see it's comments

       IS RUN BY: Part of the vlist.rmd -- see it's comments

         RETURNS: Part of the vlist.rmd -- see it's comments

    MODIFICATION HISTORY
             Created:   02/12/2002

 --=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-
 )

CLEAR ALL VARIABLES
SET ERROR VARIABLE errvar
CHOOSE vm_formname FROM #FORMS
IF errvar = 0 AND vm_formname IS NOT NULL AND vm_formname <> '[Esc]' THEN
  SET VAR vm_msg1 TEXT = +
  ('Be sure to Open ' + .vm_formname)
  SET VAR vm_msg2 TEXT = +
  (' form in Design mode, and close it.')
  SET VAR vm_msg TEXT = (.vm_msg1 + .vm_msg2)
  PAUSE 1 USING .vm_msg AT CENTER CENTER
ENDIF
CLEAR VAR vm_ms%
CLS
RETURN

*(
--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-
    PROGRAM NAME: lstvars2.rmd

          AUTHOR: Jim Limburg
                  Tuftco Corporation
                  2318 Holtzclaw Ave, Chattanooga, TN 37404
                  Voice: 423-698-8601 Fax: 423-698-0842
                  email: [EMAIL PROTECTED] --business
                         [EMAIL PROTECTED] --home

         PURPOSE: Part of the vlist.rmd -- see it's comments

       IS RUN BY: Part of the vlist.rmd -- see it's comments

         RETURNS: Part of the vlist.rmd -- see it's comments

    MODIFICATION HISTORY
             Created:   02/12/2002

 --=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-
 )

IF vm_formname <> '[Esc]' THEN
  CLEAR VAR vm_formname,errvar
  OUTPUT formvars.lst
  SHOW VAR
  OUTPUT SCREEN
  DROP TABLE frmvars
  CREATE TABLE frmvars (varname TEXT 20, varvalue TEXT 42, vartype TEXT 10)
  LOAD frmvars FROM formvars.lst +
  AS FORMATTED USING varname 1 18, varvalue 22 61, vartype 62 72
  CLS
  *(This is where it parses the information it has gathered from the
  table and creates the file to hold the SET VAR statements.)
  SET VAR vm_vars NOTE = NULL
  SET ERROR MESSAGES 2077 OFF
  ERASE frmvars.txt
  SET ERROR MESSAGES 2077 ON
  SET ERROR MESSAGES 705 OFF
  DROP CURSOR curs1
  SET ERROR MESSAGES 705 ON
  DECLARE curs1 SCROLL CURSOR FOR SELECT varname, vartype FROM frmvars
  OPEN curs1
  FETCH FIRST FROM curs1 INTO vm_vname IND vi_1, vm_vtype IND vi_2
  SET VAR vm_vnameshort TEXT = (SGET(.vm_vname,5,1))
  WHILE SQLCODE <> 100 THEN
    SWITCH (.vm_vnameshort)
      CASE '#DATE'
      CASE '#TIME'
      CASE '#PI  '
      CASE 'SQLCO'
      CASE 'SQLST'
      CASE '-----'
      CASE 'Varia'
        BREAK
      DEFAULT
        --OUTPUT frmvars.txt APPEND
        --WRITE 'SET VAR ' .vm_vname .vm_vtype '= ' 'NULL'
        --OUTPUT SCREEN
        SET VAR vm_vars = (.vm_vars + 'SET VAR ' + .vm_vname + +
        ' ' +  .vm_vtype + ' = NULL' + (CHAR(13)) + (CHAR(10)))
        BREAK
    ENDSW
    FETCH NEXT FROM curs1 INTO vm_vname IND vi_1, vm_vtype IND vi_2
    SET VAR vm_vnameshort = (SGET(.vm_vname,5,1))
  ENDWHILE
  SET CLIPBOARD .vm_vars
  DROP CURSOR curs1
ENDIF
DROP TABLE frmvars
SET ERROR MESSAGES 2077 OFF
ERASE frmvars.txt
SET ERROR MESSAGES 2077 ON
CLEAR ALL VAR
CLS
RETURN



--- Bob Powell <[EMAIL PROTECTED]> wrote:
> Hello everyone:
> 
> I have a form that works just fine from the R prompt.
> 
> EDIT USING INQFORM2 WHE STULAST = 'RUNGE'
> 
> My application calls this form and tells me that there's not enough space to
> run this form. 
> 
> Any ideas ?  Thanks.
> 
> Bob Powell
> 
> 
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to