Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters between forms
Message
 
To
07/02/2006 19:23:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01094511
Message ID:
01094513
Views:
9
Jerry,

Your second form must be modal, and whatever you return in the unload event will be returned to the caller, so your code will look like this:
do form payment with total_invoice to loMoreInfo && total_invoice must be modal

&& Now you have
with loMoreInfo 
  .Cash
  .CreditCard
  .CardNumber
  * etc
endwith
Now, let's say you want to return multiple values, then the easiest way is to use an object, so in your unload of total_invoice form you put something like:
loInfo = createobject('Empty')
addproperty(loInfo, 'cash', lnAmount) && Assuming you assigned lnAmount with the value you want to return
addproperty(loInfo, 'creditcard', lcCreditCard) && Same
addproperty(loInfo, 'cardnumber', lcCardNumber) && Same
addproperty(loInfo, 'cardholder', lcCardHolder) && Same
addproperty(loInfo, 'debitcard'), lcDebitCard) && Same

return loInfo
If the data comes from one table, instead for createobject empty and all add properties, you can use SCATTER NAME loInfo
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform