Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FoxPro / Forms / October 2008

Tip: Looking for answers? Try searching our database.

Re:  Having problems with Paramter passing between forms and prgs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Alonso - 03 Oct 2008 18:29 GMT
I need help with something.

I pass paramters to a form and the value is not recognized.

What could be causing this.

Also, I put a WAIT WINDOW inside a PRG that is called from a Form and it
won't work.

What can be happening?  Any idea.

To make this as simple as possible I will give a sample description.

The items involved:
   A form named "FORM1"
   A PRG called "PRG1"
   A form named "FROM2"
   A PRG called "PRG2"

** Here is call for FORM1 from PRG1
on key label + do PRG2 with itemID
do form1

** what happens
FORM1 opens and has a list of itemIDs to choose from..
if you hit the + key it will run PRG2 witch ACTIVATES A WINDOW and USES A
MENU using DEFINE MENU that assigns the ship-via of an itemID being shipped.
say this VAR is called VarONE.. so now VarONE = "UPS GROUND".
I put a WAIT WINDOW right after I get VarONE, but this will not happen..  it
skips over it and executes my next line.
DO FORM "FORM2"
**
Also, my variable is not passed anyway.. my FORM2 has a TxtBox with VarONE
as the control source but there is no value..

As if data is not in memory.

weird...... just weird......

Well.. let me know if there is anything else I might try..

Thank you all in advance.

Jaun.
Dan Freeman - 03 Oct 2008 18:40 GMT
By default, any memory variable (or parameter) has a scope of PRIVATE. A
private variable goes out of scope and disappears when the procedure that
creates it ends.

When you pass a parameter to a form, then, the parameter is received in a
PRIVATE variable in the form's init method. When the init method ends,
private variables go out of scope and disappear. If you want it to persist
after the end of the init method, you must store it somewhere that will
persist. (Form properties are a good place for this.)

I suspect your second problem is similar, but I'll add that you should not
use DEFINE WINDOW or ON KEY LABEL. There are newer approaches that are
easier to control and have fewer side-effects.

Dan

> I need help with something.
>
[quoted text clipped - 40 lines]
>
> Jaun.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.