Hi Igor, Thanks for the help but the first line of code:
"Dim R As DAO.Recordset" is generating the following error:
"Compile Error: User Defined Type Not Defined"
Hi Michael,
Are you sure that field CATALOG is a string datatype? If it is NUMERIC it would give you an error.
Personally I prefer code like this:
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
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson