A question about containership and forms

A question about containership and forms

Post by Bob Barro » Wed, 18 Oct 1995 04:00:00




>I have a question about containership.  If I start up Paradox with a form (formA) that calls formB, can I pass variables from form B
>to form A before I close form B?  The object tree shows that formb is not contained under formA and I think I read that you can't
>pass variables this way?  

Use this code in formA
var
varname string
formname form
endvar

if formname.open("formB") then
        varname=formname.wait()
        formname.close()
else
        errorshow()
endif

In formB, attach the following code to a pushbutton or whatever your
user will use to terminate the form:

formreturn("variable")

You can, of coure, use multiple buttons, each of which returns  a
different variable, or you can have your script retrieve the contents
of objects in formB uing some variation of the following while formB
is still open:

varname=formname.objectname.value

Quote:>Should I be using pages on a form instead of mulitple forms?  If so, what is the Opal command you use to go from one page to
>another?

moveToPage(pagenumber)
Quote:>Thanks!
>Brian Cooney

 
 
 

A question about containership and forms

Post by Kuo-Sheng (Kas » Wed, 18 Oct 1995 04:00:00


: I have a question about containership.  If I start up Paradox with a
: form (formA) that calls formB, can I pass variables from form B : to form
: A before I close form B?  The object tree shows that formb is not
: contained under formA and I think I read that you can't : pass variables
: this way?

You cannot pass variables that way, but you can pass FIELD values that
way. Invisible fields will work quite well.

: Should I be using pages on a form instead of mulitple forms?  If so,
: what is the Opal command you use to go from one page to : another?

<pagename>.moveto()

--
=========================================================================
Kasey K. S. Chang (a guy)             | Paradox for Windows Programmer

URL> http://userwww.sfsu.edu/~kschang | X-COM Guru   General PC expert
--------------------------------------+----------------------------------
Editor of XCOM and XCOM2 UN-official Strategy Guide -- FREE!  (See URL)

 
 
 

1. Containership Question

I'm having trouble checking the value of a field in a tableframe in a
multirecord object of a form.

The form has a few fields from the master table of the data model
directly on the page; then it has a couple of tableframes bound to other
tables, then a multirecord region with some fields and two more
tableframes. There is a button on the page to call up another form. This
button should usually be invisible, but in two cases it should be
visible. I'm checking the two cases in code attached to the arrive
method of one of the master table fields; the code needs to be executed
when the master table record changes. The first case is when the value
of one of the master table fields on the page is 0; that is working with
no problem. The second case checks the value of a field in one of the
tableframes in the multirecord object. My question is how to check this
value.

The same arrive method I'm working in has this code which works:
if BEmpTitl.nrecords()>2 then
  BEmpTitl.VerticalScrollBar=True
else
  BEmpTitl.VerticalScrollBar=False
endif

BEmpTitl is the table containing the field I want to check, but the
code:
if BEmpTitl."Title Code"="0020500000"

gives an error when the form is run. I've also tried:
if #Page2.BLINK.#Record8.BEMPTITL.#Record14.BEmpTitl."Title Code".value
= "0020500000"

and this fails the syntax check. Am I partway there, or on the wrong
track completely? How can I set the visible property of the button based
on the value of this field in a tableframe in a multirecord object?
Thanks for reading this far and for any responses.

2. Universe on NTWS with MS Proxy client

3. containership and duplicate names

4. "too may rows" bug in AS2K

5. How to determine containership at run-time?

6. View problems

7. Delphi2.0,Sybase & Identity Field

8. Forms 4.5 question ( Query by form)

9. simple question-Summing form output-to the form?

10. Oracle Forms question... Canvas questions

11. VFP3: KEYMATCH() question and variable-record form question

12. Forms Forms Forms