' 'This code replaces the use of DLOOKUP and other 'domain lookup functions (e.g. DFIRST or DLAST) not 'available in VB. ' Dim strSQL As String, rsDAO As Recordset Dim varReturn
strSQL = "SELECT Subject FROM tblKBSubjects"
Set rsDAO = DBEngine(0)(0).OpenRecordset(strSQL)
rsDAO.FindFirst "Subject = 'Access 97'"
MsgBox rsDAO.Fields("Subject") ' 'The key is using the criteria argument 'in the FindFirst method. The methods 'of the Recordset object replace 'the domain lookup functions. '