Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
=TableUpdate()
Message
 
 
To
24/01/2001 14:34:08
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00468066
Message ID:
00468233
Views:
17
Add that property to your textbox class. Then when you drop that class on the form, populate that property value with mytablename.ID_fieldname

>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.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform