I need to check, is some duplicated records or not (by column which is text) in my table before do my code. so I wrote the query which is working fine but slow:/ - that's the problem. Is there any fastest way to check that what my query do?
Code:
strSQL = "Select count(nazwa) " & _
"from tblGoraZleceniaZakonczone " & _
"where id_zlecenia='" & idStarego & "' " & _
"group by nazwa " & _
"having count(nazwa)>" & 1
Set rs = CurrentDb.OpenRecordset(strSQL)
If rs.RecordCount > 0 Then
...