Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing User Input from forms
Message
From
27/01/2000 15:30:39
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00323766
Message ID:
00323777
Views:
29
>Hi:
>
>I need some help or direction. I need to pass user input from forms
>to report program.
>
>Example:
>
> Ship Name: 1-20 USS Mack
> complete date: 1-10 06/12/1999
>
>base on screen input above the report will show all work for USS mack
>completed on 06/12/1999.

We need more details for a meaningful answer, but I'll take a stab at it:

Suppose you have a form with 3 controls:
txtShipName - text box containing the Ship Name
txtCompleteDate - text box containing the Complete Date
cmdRunReport - button used to fire the report

You would also create a custom method of the form:
RunReport()

In cmdRunReport.Click(), you would put
=THISFORM.RunReport()
In THISFORM.RunReport() you would have code something like this:
* Generate a cursor holding report information:
SELECT ;
  SomeFields ;
  FROM SomeTables ;
  WHERE ShipName = THISFORM.txtShipName.Value AND ;
    CompleteDate = THISFORM.txtCompleteDate.Value ;
  INTO CURSOR Output ;
  ORDER BY OrderFields

REPORT FORM MyReport options...
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform