messagebox("My cursor PatientDemo is "+ iif(used("CurPatientSummary"),"","not ") + "used") > >messagebox("My cursor is "+ iif(used("CurPatientSummary"),"","not ") + "used") >messagebox("My cursor is "+ iif(used("CurOnGoingHealth"),"","not ") + "used") >messagebox("My cursor is "+ iif(used("CurTreatment"),"","not ") + "used") >messagebox("My cursor is "+ iif(used("CurConsultants"),"","not ") + "used") > >CLOSE TABLES >MESSAGEBOX("Tables are closed now.")I don't think, you need CLOSE TABLES in the Destroy event. Comment it out, the tables would be automatically closed, if you use private DS and don't change default settings in DE. You may need close database line, but this should probably be done in the calling program after do form statement...