using Findfirst to locate recordset

RAYMOND HJ
11-05-2000, 10:23 AM
Hallo Hi...
I'm having problem how to use Findfirst in order to locate recordset. My code as below:-

dim db as database
dim rs1 as recordset
dim strTitle as string

set db = workspaces(0)opendatabase("C:Biblio.mdb")
set rs1 = db.openrecordset("Titles",dbopentable)

strTitle = "123 Database Technique"

rs1.findfirst "Title = ' & strTitle & '" --- this line
won't work.

Please help me the syntax of using FINDFIRST as above.
Thank you....

braindead
11-05-2000, 11:56 AM
Hi,

Try this code. It should work. Using dbDynaset

Dim db As Database
Dim rs1 As Recordset
Dim strTitle As String

Set db = Workspaces(0).OpenDatabase("C:Biblio.mdb")
Set rs1 = db.OpenRecordset("Titles", dbOpenDynaset)

strTitle = "123 Database Technique"

rs1.FindFirst "Title = '" & strTitle & "'"

RAYMOND HJ
11-06-2000, 08:21 AM
It works! Thank you very much.....

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum