Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I return a Parameter to the Calling Form 1

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
I am calling a subform from a form like this:

DO FORMX WITH lnAnswer


How can I return lnAnswer to the calling form?
Thanks,

Leo ;-)
 
You really should read the fine manual.
Extract form the said manual:

Returning a Value From a Form
You can use forms throughout your application to allow users to specify a value.

To return a value from a form

Set the WindowType property of the form to 1 to make the form modal.


In the code associated with the Unload event of the form, include a RETURN command with the return value.


In the program or method that runs the form, include the TO keyword in the DO FORM command.
For example, if FindCustID is a modal form that returns a character value, the following line of code stores the return value to a variable named cCustID:

DO FORM FindCustID TO cCustID

 
Hi

DO FORMX WITH lnAnswer TO lnAnswer

In the form reurning the value...
Create a form level variable.. myAnaswer
STORE the value at aprropriate place..
and in the UnloadEvent put the code..
RETURN ThisForm.myAnswer

Hope this helps you :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top