-
Find First
Set db = DAO.Workspaces(0).OpenDatabase("rem.mdb", False, False, ";pwd=urs")
Set dt = db.OpenRecordset("Name")
this is how i am opening a database
i dont have data control or ado on my form
when i try to find with the coding
dt.FindNext ("Jhon")
i get an error message that "not supported by this object"
and when i use this coding
dt.FindNext = ("Jhon") or dt.FindNext = "Jhon"
i get an error message argument not optional
plzz help me
-
Re: Find First
you need to open the database with a specific cursor type that supports findfirst - like snapshot I think - see help on the opendatabase function
-
Re: Find First
Hi
you want search the name = "Jhon"
Set db = DAO.Workspaces(0).OpenDatabas ("rem.mdb", False, False, ";pwd=urs")
' OpenRecordset (put the table name in)
Set dt = db.OpenRecordset("Name")
While Not dt.EOF And dt.Fields!Name <> "Jhon"
dt.MoveNext
Wend
dt!Name ' is "Jhon"
Gordon Ngai