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 strongm 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 pass multiple values from 1 window to another??

Status
Not open for further replies.

TonCoronel

Programmer
Dec 1, 2003
37
NL
I have to give 2 integers from 1 window to another. how can I do this?
 
See OpenWithParm() function on Help on line. You can use a structure with two fields, or a non-visual object with an array inside it.

[bomb] Lenin.
 
I know I already looked in the help file. But I dont understand how to build such a structure and when I pass it how I can read it out again.
 
there are few ways to do this
lets say you wanna pass li_temp1 and li_temp2 to a window
1. quick & dirty fix:

OpenWithParm(w_employee, string(li_temp1)+"|"+string(li_temp2)

And in the open event of w_employee
string ls_messsage
ls_message = message.stringparm

You can then use Pos() & Mid() functions to extract the integers out of ls_message

2. Recommeded way
Create a new structure called s_int
This structure has two integers. [int1 and int2]

s_int lstr_int
lstr_int.int1 = li_temp1
lstr_int.int2 = li_temp2

opensheetwithparm(w_employees,lstr_int)

and in the open event of w_employees
s_int lstr_int
lstr_int = message.powerobjectparm
and then use lstr_int.int1 and lstr_int.int2

cheers
MM

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top