my goal is to test a table for a record and if that specific record exists, do nothing, else do some insert record. I wrote the following SQL statement to try and retrieve the specific record

```
Update: Dim strSQL2 As String
        Dim objRecordset As ADODB.Recordset
Dim BatchID As Long
Dim instrumentName As String
strSQL2 = "SELECT * FROM tblInstrumentInterfacelog " & _
          "WHERE BatchID = " & BatchID & " " & _
          "AND InstrumentName = '" & InstrumentName & "'" 
Set objRecordset = CurrentDb.OpenRecordset(strSQL2, dbOpenDynaset, dbSeeChanges)
If objRecordset.RecordCount > 0 Then
Else
"logic to insert record"
End if 

```

I get an error *type Mismatch* at the line

```
Set objRecordset = CurrentDb.OpenRecordset(strSQL2, dbOpenDynaset, dbSeeChanges)

```

The schema for tblInstrumentInterfaceLog is:

* [InstrumentInterfaceLogID] [int] IDENTITY(1,1) NOT NULL
* [InstrumentName] nvarchar NOT NULL
* [BatchID] [int] NOT NULL
* [FileName] nvarchar NOT NULL

I only need help on the provided code, why is this type mismatch occurring?