Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Double-entry
Message
 
À
28/12/1999 10:56:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00308600
Message ID:
00309379
Vues:
29
>Thanks for the code and it appears to work for the most part. A couple of things:
Jeffrey!
Try this model with a 2 TextBox Form: TextBox1, TextBox2 and a PostButton
1) Add a property to TextBox1 and TextBox2 with a name like "ValidationOkay"
2) Prepare for the first entry cycle:
....by setting TextBox2.ValidationOkay=.F., TextBox2.ValidationOkay=.F.
....by setting thisform.PostButton.Enabled=Thisform.TextBox1.ValidationOkay AND Thisform.TextBox2.ValidationOkay
....by "blanking" TextBox1.Tag, TextBox2.Tag (eg:Form1.textBox1.Tag="")
....By implementing a LostFocus method for each textbox:
3) Service the entry (call a udf passing references names, or embed in lost focus or VCX with 'This' operators)
..if this.tag="" && Nuthin there, must be first entry cycle
....this.tag=this.value
..else && Tag has an occupant, must be second cycle
....if this.value#this.tag
......=messagebox(this.name+[ entry does not match last entry:]+this.tag)
......this.ValidationOkay=.f.
....else && Tag and Value match
......this.ValidationOkay=.t.
....Endif &&this.value#this.tag
..Endif &&this.tag=""/else/not blank
thisform.PostButton.Enabled=Thisform.TextBox1.ValidationOkay AND Thisform.TextBox2.ValidationOkay
return && From this lost focus

The post button will not respond unless all Validations have passed. Of course, you will need house cleaning to clear the current buffer (should the user not be able to reconcile both entries, or after PostButton is enabled because validations passed.)
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform