Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record
Message
From
06/07/2011 08:54:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/07/2011 02:43:04
Muthu Vel
Sty Company
India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Record
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01517382
Message ID:
01517411
Views:
42
>I have three form(dataentry.scx, search.scx,report.scx) in the dataentry form of int event i written "thisform.txtregno.value = regno". let assume when i am in the 50 record for data entry, at the time i want to search the record for one enquiry so i simply click the search button in the dataentry form, the search form will open find the record. then i exit from the search form the dataentry form will open, the txtregno display first record of my table but i want to display 50 record of my table because i already entered the data from 1 record to 49 record.
>
>how to do this?

Two ways to do this:

1) Restore the record pointer after searching:
local lnRecno
lnRecno = recno()
llDuplicate = seek([some expression])
goto (lnRecno)
2) Re-open the table with a different name.
local lnSelect
select 0
use MyTable again order [some index tag]
llDuplicate = seek([some expression])
use
select (lnSelect)
The second method is safer, in that everything is maintained in the table you are editing: especially record pointer and index. Also, you won't have problems with buffering, which you may have with the first method, depending on the buffering mode used.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform