Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enabling Fields on a Form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01034569
Message ID:
01034581
Vues:
17
>Yep thats it if I have no record in table they dont work but as soon as I enter a record in the table it works. How can I get around that?

Change the logic if you have no records in table Don't enable this box, or if you want to enable it:
*** Button Click
IF RECCOUNT("YourTable") == 0
   thisform.....Date.ControlSource = NULL
ENDIF
thisform.....Date.Enable = .t.

*** In LostFocus of the Control

IF ISNULL(this.ControlSource) AND NOT EMPTY(this.Value) && Or whatever checks you need
   INSERT INTO YourTable (Field List Here) VALUES (values for that fieldlist)
   leValue            = this.Value
   this.ControlSource = "YourTable.YourField"
   this.Value         = leValue
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform