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