Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search Form output to report
Message
 
To
25/04/2000 06:27:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00363046
Message ID:
00363070
Views:
17
>NewBe
>Hi Again,
>
>I'm trying to create an (EXACT) search form (Two text Box's) on it, that allows the user to input (policy.group_code, policy.ins_co_name ) data to the form, then with a command button that starts the search. If the search the results are an
>EXACT match send to the cursor then to the report. If not an exact match, return message "Match Not Found, Try Again".
>Then have the search form empty the fext box's and start over, or exit. Frustrating being a Newbe, if anyone can help......
>
>John

John, something like this maybe:

*Search commandbutton Click()
lcGroupCode = thisform.text1.value
lcIns_co_name = thisform.text2.value

SELECT * from policy ;
WHERE policy.group_code == lcGroupCode ;
AND policy.ins_co_name == lcIns_co_name ;
INTO CURSOR myReport

IF RECCOUNT("myReport) > 0
* do something
ELSE
?? CHR(7)
WAIT WINDOW "Match Not Found, Try Again" TIME 2 NOWAIT
ENDIF

use in myReport
thisform.text1.value = ""
thisform.text2.value = ""
thisform.refresh()
thisform.text1.SetFocus()
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform