|
-
June 14th, 2001, 02:46 PM
#1
Seek Method in Access
This code is not working. Any suggestions?
Dim cnBiblio As Connection
Dim rsAuthors As New Recordset
Dim mycommand As Command
Set cnBiblio = New Connection
Set mycommand = New Command
cnBiblio.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = c:\Program Files\Microsoft Visual Studio\VB98\Biblio.mdb"
mycommand.CommandText = "Create Index MyIndex on Authors(author)"
'Set rsAuthors = New Recordset
Set rsAuthors = mycommand.Execute
rsAuthors.CursorType = adOpenKeyset
rsAuthors.LockType = adLockOptimistic
rsAuthors.CursorLocation = 3
rsAuthors.Open "Authors", cnBiblio, , , adCmdTableDirect
MsgBox rsAuthors.Supports(adIndex)
rsAuthors.Index = "MyIndex"
rsAuthors.Seek "Author = 'Boddie, John'", adSeekFirstEQ
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
|