Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New to VFP, need a little help
Message
From
31/03/1998 15:43:25
 
 
To
30/03/1998 18:52:05
Jeffrey Score
Dept of Defense (Usmc)
Iwakuni, Japan
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00088266
Message ID:
00088501
Views:
40
>I work in an aviation analysis section, I am new to VFP and would ike to create a form that would allow other analysts here to pull up a set of records by a specific date range and specified field such as a part number or a serial number and have it show an average for information like time needed for repair etc. I realize that this can be done by creating a query as well but I need a simple interface for users that are not familiar with VFP that I could incorporate into a menu to allow for this data to be extracted easily.
>
>Thanks,
>
>J.H. Score

Jeffrey,

Here's something you may be able to use:

Create a report in the report designer using your data table(s) with no criteria in it (all records included). Then create a form, add 'From' and 'To' text boxes for each of your fields (date, part # & serial #). Add a couple of buttons for 'Exit' and 'Run report'. In your 'Run report' button click event construct your filter into a character type memory variable, adding the search criteria for the fields where the user typed some info, i.e.
mfilter = ""
If User_Input_Field1
  mfilter = mfilter + "mytable.field1>=ThisForm.TextBoxFrom1.Value and ";
            mytable.field1<=ThisForm.TextBoxTo1.Value"
Endif
If User_Input_Field2 ... and so on and then:

Report Form MyReport For &mfilter To Printer && (Or to Preview)
Or maybe you can put the mfilter variable to a Select - SQL Where clause to printer. HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform