Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching a table and jumping to the record
Message
From
01/06/2005 03:30:49
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01018885
Message ID:
01018887
Views:
11
Given that you have an index tag on each field, this is easy thanks to rushmore.
lcExact=SET('EXACT')
SET EXACT OFF
LOCATE FOR field1=trim(cField1) and field2=trim(cField2) and field3=trim(cField3);
  and field4=trim(cField4) and field5=trim(cField5)
SET EXACT &lcExact
>I have a form which is bound to a table. When the user clicks on my search button it pops up with another form allowing the user to search on 5 different fields (each field is within the table). I am after some advice as to what is the best and quickest way to search the table? The user may only search on one field, how do I handle it if the user decides to enter information in 3 of the fields to narrow the search results. My search basically needs to handle upto five fields?
>
>In addition how can I jump to the record on my main form from the results of the search?
>
>MAny Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform