I am usig VB6 & Access 2000 to create a program for a clinic to store patient details.
I want to check whether a record with same date exists and if exists delete it and save new details.but with my coding it is not deleted even if the record exists.

adconn1.execute "Delete from Patient_Det where ID='" &txtId.text& "' and CheckupDate=Cdate(#" & chkdate & "#)"

please help.

I think you will find that SQL uses the american date format mm/dd/yyyy, I usually find it safer to use dd-mmm-yyyy eg 14-jun-2010

U may use the following

adodc1.recordsource="select * from table1 where id=" & txtid & " and date=#" & txtdate & "#"
if adodc1.recordset.recordcount>0 then
end if

hope it will help