If I understand correctly, you will need to open a recordset for the query "q_skenirano" where the field "Broj naloga" is Null.
So, you will need to do something like this, add the Microsoft DAO Object library in the reference.
Code:
Dim db as DAO.Database
Dim rs as DAO.Recordset
Set db = CurrentDb
'.....Existing code.....
Set rs = db.OpenRecordset("SELECT * FROM q_skenirano WHERE [Broj naloga] Is Null", dbOpenSnapshot)
If Not rs.EOF Then
MsgBox "krivi barkod"
'.....Existing code.....
End If
'Clean up code
rs.Close
Set rs = Nothing
Set db = Nothing
However, I do not quite understand the logic of checking after you insert into the record into a table. Shouldn't you be checking before inserting the record to the table?