Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set FILTERS and GO rec problem?
Message
From
26/11/2001 00:39:46
 
 
To
26/11/2001 00:01:06
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00585621
Message ID:
00585627
Views:
24
>I have an application that displays records in a grid. There are OPTION buttons to limit what records are displayed. I am having a problem "controlling" the current record when using these FILTERS.
>
>Here is an example.
>
>
>RECNO     MARKED
>1           N
>2           Y
>3           N
>4           Y
>5           Y
>6           N
>
>
>In the above table... when my FILTER is set to NONE, all are displayed.
>
>Assuming my "current" record is 2 and the FILTER is switched to show only MARKED records... then current isn't a problem because it is in the FILTERed records.
>
>If the "current" record is 3 and the FILTER is switched to show only MARKED records... then current is a problem because that record is NOT displayed.
>
>I have a METHOD that controls the "highlight" of the current record and this is where the problem is very noticeable. I was storing the current RECNO() and then issuing the FILTER change. Then I was using a GO vStoredRecNo to highlight the "current" record. This worked fine when I was on a displayable record when the filter was changed. The GO appears to operate fine when it is not, but the "current" rec is not there so therefore nothing is highlighted.
>
>I tried using an EOF() or FOUND() call to see if I could capture this problem to no avail.
>
>Ideally, if the "current" record is NOT in the displayed filtered set, then I suppose going to TOP would be the course to follow but I don't know how to achieve this short of issuing a series of SEEKS, SKIPS or a LOCATE or somthing similar that will fire an EOF or FOUND().
>
>Suggestions?

Once you've changed your filter, do a GO TOP or just a SKIP to force the filter to "kick in" or any other command that forces the record pointer to move.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform