|
-
August 26th, 2001, 12:17 PM
#1
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
-
August 27th, 2001, 12:40 AM
#2
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
-
August 30th, 2001, 04:46 AM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|