simple seek

alarants

Registered User.
Local time
Today, 21:35
Joined
Apr 17, 2009
Messages
46
I am moving on nonfamiliar ground and have generated some mistakes. For pro-s it is elementary, of course, but please share your experience.

Public Function Name()
Dim T As Recordset
Set T = CurrentDb.OpenRecordset("Tablename", dbOpenDynaset)
T.FindFirst "Columnname""Criteria"""
End Function

It is done exactly as in http://allenbrowne.com/ser-29.html but gives "Syntax error in expression". Have tried everything imaginable also Seek but nothing works. Looked over libraries but still nothing.
 
try;

Public Function Name()
Dim A As DAO.Database
Dim T As DAO.Recordset
Set A = CurrentDb
Set T = A.OpenRecordset("tblExemplo", dbOpenDynaset)
T.FindFirst "[Columnname] = '" & Criteria & "'"
End Function
 
Thanks, it works.
 

Users who are viewing this thread

Back
Top Bottom