Does the table from which you are trying to delete has a primary key? Is this primary key retreived in your recordset?
>Yeah i mean detailrs i just mistyped it. but since i include option explicit in my forms, i found more errors and thanks for that. i include HeaderRS.Update after HeaderRS.Delete and it works but i got a runtime error saying "insufficient or incorrect key column information; too many rows affected by update" and i try to look at the header & detail tables, it's already deleted. i suspected that sql server returns an error so i try deleting one row from header table using query analyzer but i got no error. so what i did i include "On Error Resume Next" in CmdDelete_Click() and it works. I'm not certain that this is a good idea. What do u think?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com