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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flaging a duplication

Status
Not open for further replies.

Brationer

Technical User
Feb 12, 2010
1
BB
Hi, I am a newbe here and a novice to Pdox programming.
Problem: I designed a little database, using Pdx9, by linking three tables by a primary key field, FileNum;it works fine. However, I need this code verified that would flag the user if he enters a duplicate FineNum. FileNum is of type Alpha; eg. AC1052


Any help would be greatly appreciated.


method changeValue(var eventInfo ValueEvent)

var

tc TCursor

NewFileNum string ; new file number

endVar


NewFileNum = eventInfo.newValue() ;new file number gets newValue

tc.open("Clients.db") ; open database

if NewFileNum <> "FileNum" then ; is new file number found in database?
; if so, display message.

;[This line is NOT working when I use the "=" sign
;to compare the variables]


msgStop("Error !!", "Duplicate FileNum "
+ NewFileNum
+ " detected. Please use a unique FileNum or press Esc to cancel.")

endIf


endMethod


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top