Marcia,
Thanks for the response. I'm creating the cursor based on the entry by the user. They enter in a patient id, the system searches, if it finds it, then it creates a cursor listing on the found record(s). I know I could've done a set filter but I don't trust those to work all the time. Something may fall through the crack! (know what I mean?)
Anyway here's the code. It's in my Valid method of the only field they enter. Let me know what you think.
Thanks in advance:
SELE CDCHIV
SET ORDER TO CDCID
IF LEN(ALLT(THIS.VALUE))=14
HIV_TEMP = THIS.VALUE
LOCATE FOR CDC_ID = HIV_TEMP
IF FOUND()
THIS.ENABLED = .F.
SELECT .F. AS PICK_DEL, CDC_ID, SPECNO, ;
UNIQKEYSAS, UNIQKEYBAY ;
FROM CDCHIV ;
WHERE CDC_ID = HIV_TEMP ;
INTO CURSOR TEMP_HIV
ELSE
MESSAGEBOX('CDC Id not found in CDCHIV database! Please re-enter!', 0, 'Failed Search -- CDC-HIV Database')
THIS.VALUE = ''
THISFORM.REFRESH()
ENDIF
ELSE
MESSAGEBOX('Invalid CDC-Id entered! Please re-enter!', 0, 'Invalid CDC-Id')
ENDIF
Thanks in Advance.
J. Turner