Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Basic confusion
Message
 
 
À
15/12/1999 00:20:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00303899
Message ID:
00303980
Vues:
28
>Hi. VFP6 user here with some basic questions:
> I am trying to build a form to ask for a variable, then pass the variable to a 'report form to print' command and use the variable in the report (as well)
> Questions:
> 1. How do I get the form to go away one I am done with it?
> 2. How do I use the variable that I captured in "REPO FORM myrept TO PRINT FOR &myvar $ mycodes"?
> 3. How do I use this variable to call the heading of the report from another dbf. Old 2.6 way was "codelist.codes&myvar" would pull the field codelist.codeA from the dbf codelist.
> Thanks !
>Randy

General tip: See the Etiquette section of the Rules to help you fromulate questions in order to elicit the best possible replies. This will go a long way to help answer your questions.

This post is a good example of what not to do as I can answer your first question but #2 and #3. So the odds of you getting answers to them now in this same thread have dropped.

I have an Exit button subclass that has 1 line of code in its Click methos: ThisForm.QueryUnload()

In my form subclass, I have code in the QueryUnload to check if the form can be unloaded, either calls my form's mSave or mCancel method. my mSave method goes through all open views and tables in the form's private datasession and does a Tableupdate on them. The mCancel method does a TableRevert on all the tables and views. My form also has a lCanceled property that is by default set to false.

My Cancel button class has 2 lines of code:

ThisForm.lCanceled = .t.
ThisForm.QueryUnload()

In the QueryUnload, I test the value of ThisForm.lCanceled and then either call the mSave or mCancel method of the Form. If all goes well, the end of the QueryUnload method issues a ThisForm.Release() command.


I do not understand what exactly you are wanting to know in Question 2 and 3.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform