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
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