Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paradox Duplicates

Status
Not open for further replies.

rgeinosky

Technical User
Joined
Aug 17, 2000
Messages
6
Location
US
I have a table set up with SS# as the key field. I have been asked to add a field called Control#. The entry clerk will enter the Control#. I would like to establish a Validity Check to test for duplicates. I cannot see how to do this. Is there a way using a MethodAction such as "Departfield" or something similiar that will test for duplicates in that field. I cannot make this a "Key" field.
 
Best place to do this is in the CanDepart method. I will require you to scan the ENTIRE table to ensure that the value is not already present. If it is, then prevent departure using an error code. See below : <fieldName> is the actual fieldname in the table / form.

method CanDepart(var.....)
var
tc tcursor
endVar
tc.attach(self) ;if this won't work, attach to the fieldName
if tc.locate(&quot;<fieldName>&quot;, self.value) then
eventInfo.setErrorCode(CanNotDepart) ; CanNotDepart is non zero constant
endif
endMethod

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top