Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with VCR buttons
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Help with VCR buttons
Divers
Thread ID:
00360847
Message ID:
00360847
Vues:
53
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform