Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
=TableUpdate()
Message
De
24/01/2001 14:34:08
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00468066
Message ID:
00468130
Vues:
17
Thanks for the reply. I am getting error message "Property CSOURCE is not found". I did add "cSource" in the New Property of the form and changed the ControlSource (of that field) to "m.cSource". I copy/paste the following code in Text1.LostFocus Is that correct?

>If you want to do this, do not bind the control to a field. If you are going to do this regularly, create an ID textbox class with a cSource property:
>local lcTable, lcField, lnSelect, lnRec, lnID, lnCount
>lcTable = juststem(alltrim(This.cSource))  && mytable.fieldname
>lcField = justext(alltrim(This.cSource))
>lnSelect = select()
>select (lcTable)
>lnRec = recno()
>lnID = This.Value
>count to lnCount for ID = lnID
>goto lnRec
>if lnCount > 0
>   ** Duplicate found
>   select (lnSelect)
>   return 0
>endif
>** otherwise the count was 0
>replace &lcField with lnID
>select (lnSelect)
>return .t.
Today is tomorrow's yesterday.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform