Can someone please look at my code and tell me what I'm doing wrong, I keep getting an Invalid Use of Null error. I'm new to VBA so please forgive me. Basically I have 2 recordsets of 2 different tables. I'm trying to see if any records in rstHD are duplicated in rstSM, if so then delete the record from rstHD. rstHD.MoveFirst Do Until rstHD.EOF rstSM.MoveFirst srNumHD = rstHD![srNum] Do Until rstSM.EOF srNumSM = rstSM![srNum] If srNumHD = srNumSM Then rstHD.Delete Exit Do Else rstSM.MoveNext End If Loop rstHD.MoveNext Loop rstHD.Close rstSM.Close Set rstHD = Nothing Set rstSM = Nothing If I add a check for null before assigning srNumSM = rstSM![srNum] like so: Do Until rstSM.EOF If IsNull(rstSM![SRnum]) Then Exit Do End If srNumSM = rstSM![SRnum] And then it works but it doesn't successfully find the duplicates and delete the duplicate row. Any help would be greatly appreciated.