Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Skip won't budge it.
Message
From
06/04/1998 17:38:21
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00089984
Message ID:
00089989
Views:
38
>I have another one of those baffling problems that I'm probably becomming famous for. :)
>
>Here's the problem: When the code tells the computer to move to the next record, sometimes it doesn't move. This is only happening to one client. That client has a huge table, and I'm thinking that has something to do with it. Also, the problem seems to occur when you try to move to the next (or previous) record after editing the current one. There's no buffering going on; the changes are made straight to the table.
>
>Here's the setup: I have a table of client trips. It is indexed by client number. I have a form that allows you to edit/view these trips. It should let you cycle through the trips by using the "next trip" and "previous trip" buttons.
>
>The code to move to the next trip is as follows:
>
>skip
>if eof()
> go top
> tripnum = 1
>else
> tripnum = tripnum + 1
>endif
>
>(The "tripnum" is because it keeps a counter of which trip you are on. It updates "tripnum" as it should, even when it ignores the skip.)
>
>So that the user cycles through the trips _of that client_ and not _all_ trips in the table, I have tried two methods.
>
>First, I did "set filter to trips.client_num = cnum". This worked in general, but the problem occured frequently.
>
>A friend suggested I use "set key to cnum, cnum" instead. I tried this with high hopes. Nope. Same problem.
>
>There are no errors given and the problem doesn't always happen. The code is simple enough; just tell it to skip to the next. It's just not doing it.
>
>Any ideas?
>
>Thanks in advance,

This is an interesting problem. How far have you gone to verify that the record is not moving?
Can you verify this in the watch window with a trace on recno()? IOW, have you made certain that a SKIP is being issued and the pointer doesn't move, or could it ba a form refresh problem? Is it consistent with which records it happens on?
Are there any record validation rules?
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform