General information
Category:
Coding, syntax & commands
You can use the following convention to call your second form:
do form frm1Name NAME frm1Test
where frm1Name is the name of the second form and frm1Test is a variable. Now, from the second form you can reference ANY objects on the first by using
frm1Test.
in the same way as per usual. So to change the caption property of the first form, from the second form, you could say
frm1Test.caption = 'Hello'
Alternatively you could invoke the second form by using the following line
do form frm1Name with lnAccount, ldDate to lnTemp1, ldTemp2
where lnAccount is the account number, ldDate is a date, and lnTemp1 and ldTemp2 are variables used to store the result. In the INIT event of the second form use the parameter statement to receive this data. Remember, in the INIT event of the second form, the data that you pass is only accessible by this method, so you need to move the data to another variable. Then, in the unload event of the second form, simply return the data. So:
1)On the click method of button on first form
do form frm1Name with lnAccount, ldDate to lnTemp1, ldTemp2
2)On the INIT methodt of the second form
parameter lnParam1, ldParam2
thisform.lnAccount = lnParam1
thisform.ldDate = ldParam2
3)On the UNLOAD method of the second form
return thisform.lnAccount, ldDate
This should return the values back to the first form.
I hope this was of some use
Derek
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only