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:59:09
 
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:
01018893
Views:
11
You can either use a select statement, which I prefer, or SET FILTER TO field1=trim(cfield1) and field2=trim(cfield2)... If you choose the SQL select option, you have to SET ANSI OFF first. To avoid having to rebuild the grid, I always bind the grid to a cursor, which I initialize in the activate of my form, by the command
Select * From myTable Into Cursor myCursor Readwrite Where .F.
lcAnsi=Set('Ansi')
Set Ansi off
Select * From myTable Where field1=trim(cfield1) and field2=trim(cfield2) ... Into Cursor curDummy
Set Ansi &lcAnsi
Select myCursor
Zap
Append From Dbf('curDummy')
YourGrid.Refresh()
>Thanks Tore
>
>What if I have 2 records as a result of the search. I want to display them to the user and allow the user to select one of them which will then jump to that record and then display this information in my main form. Do I need to use a select statement?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform