Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report Output Order
Message
 
À
23/04/2000 17:45:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00362581
Message ID:
00362633
Vues:
12
Generally you'd run a query off the control values in your form if I'm following you here. Then place code in the click event of a Print button
If you were returning data from 2 tables it be like:

* Note: You'll want to validate that at least one of your textboxes have a value entered. I assume you know how to do that.
Anyway, if you have 2 tables you need matching records from it would look like this:
* cmdPrint.Click
SELECT table1.name1, mytable2.myfield2;
FROM mytable1, mytable2;
WHERE mytable1.myfield1 = txtMyTextBox1;  && or MyVar1 if its the controlsource
AND mytable2.myfield2 = txtMyTextbox2;    && or MyVar2 if its the controlsource
INTO CURSOR MyCursor  && or cMyCursor, etc, whatever...
* Of couse don't try comments inside SQL statements like that above :)~ 

IF _TALLY > 0
   * We have records to report
   REPORT FORM MyReport PREVIEW
ELSE
   * We have no matching records
   MESSAGEBOX("No Records Match Your Request")  && or WAIT WINDOW if you prefer
ENDIF

USE IN MyCursor  && Close the cursor
* End cmdPrint.Click
I saw your last post and thought maybe Evan Delay had gone off line since it didn't show a reply to your last question. HTH

BTW, someone told me "into" isn't a word. Is that true? Guess I need a dictionary. Using "in to" all the time looks dumb.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform