Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record searching on textbox lostfocus event
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Record searching on textbox lostfocus event
Miscellaneous
Thread ID:
00834029
Message ID:
00834029
Views:
94
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
Next
Reply
Map
View

Click here to load this message in the networking platform