I have written a code in VBA
DoCmd.Save
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE Nz(table.tktNo," & Chr(34) & "" & Chr(34) & "), Nz(table.flightNo," & Chr(34) & "" & Chr(34) & "), Nz(table.dateofTravel," & Chr(34) & "" & Chr(34) & "), Nz(table.dest," & Chr(34) & "" & Chr(34) & "), Nz(table.origin," & Chr(34) & "" & Chr(34) & ") FROM table WHERE (((table.tktNo) Is Null) OR ((table.flightNo) Is Null) OR ((table.dateofTravel) Is Null) OR ((table.dest) Is Null) OR ((table.origin) Is Null) AND ((table.staffName) = " & Forms!frm_Main!Cmb_Staff & " ))"
DoCmd.SetWarnings True
DoCmd.Close
When i press update after deleting some records it does not delete in forst Attempt, however it does in the second attempt. Please Help