: I creat patient database which have patient ID field (text field) to enter patient No. a combination of charater and number(not an autonumber). I need a code to protect entering of a same ID when entering a new patient so that an existing patient ID should not be overwritten or there would be no same ID number.
:
:
: Private sub ID_validate()
:
: If (Eval("DLookUp(""[P_ID]"",""[rsPatient]"",""[P_ID]=frmPatient.[txtP_ID]"") Is Not Null")) Then
: Beep
: MsgBox "Patient ID already existed!!",
: End sub
:
: I tried this code but it doesnot work, in fact it seems the Eval and DLookUp function doesnot work at all in my program.
:
: I would be very grateful if anyone help me in this problem.
:
: Thank you.
:
: Zela.
:
:
See Reply in Access Forum
In a World full of blind men the one-eyed man is King