Private Sub Command32_Click() Dim R As DAO.Recordset Dim SQLText as String SQLText = "Select * From Product Where Catalog = 'CAT3';" Set R = CurrentDb.OpenRecordset(SQLText,dbOpenDynaset) ' consider dbOpenSnapshot If not R.BOF() Then MsgBox "Record exists" Else MsgBox "Record not found" End If R.Close Set R=Nothing End Sub>The following line in the code below generates a Data Type Mismatch Error any ideas why? I took the code straight out of a MSAccess book.
Private Sub Command32_Click() > >cDim R As Recordset, SQLText >SQLText = "Select * From Product Where Catalog = 'CAT3'" >Set R = CurrentDb.OpenRecordset(SQLText) >If R.RecordCount Then > > MsgBox "Record exists" >Else > MsgBox "Record not found" >End If > >End Sub