Hi, Michelle!
Yes you can, just some programming tricks. See code sample below, in bold - differences
if !eof()
lcPrev = MyField
SKIP SCAN
REST && scan from current position till the end
lcNext = MyField < do stuff here using current record plus the stuff gathered from other
records >
lcPrev = MyField
ENDSCAN
endifHTH.
>Not using buffering. I'm not sure how that would help?
>
>What I'm trying to do is this:
>
>
>SELECT myTable
>SCAN
> lcPrev = < field from previous record >
> lcNext = < field from next record >
> < do stuff here using current record plus the stuff gathered from other
> records >
>ENDSCAN
>
>Because I'm scanning, I didn't want to be jumping around for fear of confusing VFP. Do you think I'm safe in doing this:
>
>SELECT myTable
>SCAN
> SKIP -1
> lcPrev = mytable.field
> SKIP 2
> lcNext = mytable.field
> SKIP -1
> lcNext = mytable.field
> < do stuff here using current record plus the stuff gathered from other
> records >
>ENDSCAN
>
>Obviously, I need code to check for the ends of the table, but I wanted to keep it simple for the example. Can I do that without the SCAN losing track of where it is?
>
>Thanks,
>
>Michelle
>
>
>>Why don't you want to move the record pointer? If you are using Optimistic Table buffering, it shouldn't matter.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.