When I enter a Reception number (unique field) into my data entry
form, I want to scan the table if this number already exists. I not,
then the user can enter data. If yes, the user cant depart from that
field and I also want to check if the existing record has any blank
fields. If there are any blank fields, I want to send a message to the
user that the record needs editing. If there are no blank fields in
the record, a message should say that its a duplicate record.
What am I doing wrong?
Thanks.
Margot
method changeValue(var eventInfo ValueEvent)
var aa string
tc TCursor
endVar
aa=eventInfo.newValue()
if aa <> self.value then
tc.open("CompSales.db")
if tc.qLocate(aa) and "Field Name" = blank() then
beep()
msgInfo("Duplicate Record!", "Edit Record !")
disableDefault
eventinfo.setErrorCode(CanNotDepart) else
beep()
msgInfo("Duplicate!", "Duplicate Record !")
disableDefault
eventinfo.setErrorCode(CanNotDepart)
endif
endif
endMethod