Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record searching on textbox lostfocus event
Message
De
02/10/2003 01:51:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00834029
Message ID:
00834100
Vues:
20
Hi,

You may use:

IF SEEK( This.Value, This.lcTable, This.lcIndex )

instead of: SEEK(.... ) and then FOUND()

HTH,

Dennis

>Hi All,
>i've a textbox class and i've added 3 property to it. called lctable,lcindex,llunique.
>i wantto do when the user lost the focus of the textbox , lost focus event of textbox will search entered value on the table and will alert that 'this record allready saved on this table' etc.. i've code below but vfp gives "this record allready exist on this table" as my messagebox syntax.
>
>here is my code,
>
>* textbox lostfocus event code
>If This.llunique = .T.
>lcvalue=this.value
>	SEEK (this.value) ORDER (this.lcindex) IN (this.lctable)
>If Found()
>		Messagebox("&lcvalue allready exist on the table",16,"Opps...")
>		This.SetFocus
>	Endif
>Endif
>
>
>So, it doesnt noticed that if user enter some values or not
>eg (there is 2 record on the table which is idno 123 and 1234 ) vfp behaviour allways found()=.t. but when i enter eg 'rtf123' i am getting same alert why ?
>
>how is your suggestions about this matter? i wantto use this control in my standart base txtbox class and it should be parametric for tablename,indexname and will search entered value if found() .f. no problem can append or etc, if .t. must alert the user 'this value allready exist'
>
>how can i do this ?
>
>PS : sory for the bad english but i am very sleeples and tired :)
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform