Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters between forms
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01094511
Message ID:
01094513
Vues:
7
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform