Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with VCR buttons
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Help with VCR buttons
Miscellaneous
Thread ID:
00360847
Message ID:
00360847
Views:
54
I've set up a group of VCR buttons for the user to move incrementally through the table on a table maintenance form. I've tried to make it an active control by enabling and disabling buttons according to the current record no. ie., the top and prev buttons are disabled if you're at the first record, the bottom and next buttons are disabled if you're at the bottom of file, etc. This worked fine, until I got some deleted record in the file, at the record one position. Now, only the prev and top buttons are enabled, and the next/bottom buttons are disabled, because it's sitting on record 1, which is a deleted record. Any ideas?

Thanks
Bob Ohrstedt


Here's the code:do case
case recno()-1
this.command1.enabled = .f.
this.command2.enabled = .f.
this.command3.enabled = .t.
this.command4.enabled = .t.

case recno() => 2 .and. recno() < reccount()
this.command1.enabled = .t.
this.command2.enabled = .t.
this.command3.enabled = .t.
this.command4.enabled = .t.

case recno() = reccount()
this.command1.enabled = .t.
this.command2.enabled = .t.
this.command3.enabled = .f.
this.command4.enabled = .f.

endcase
Robert J. Ohrstedt
RJO Associates
Next
Reply
Map
View

Click here to load this message in the networking platform