Problems with recordsets

tinker

Registered User.
Local time
Today, 09:33
Joined
Aug 20, 2001
Messages
25
Hiya,

When creating a database from scatch, im trying to open a recordset by first setting
dim d as database, r as recordset, mysql as string

then i set r = d.openrecordset(mysql)

but it doesnt recognize the word database. (ive never set up a database from scratch before, ive always made alterations to existing databases). Do i need to setup a ODBC connection or something.

Thanks in advance
 
This is what I use


Dim Db As Database
Dim Rs As Recordset

Set Db = CurrentDb
Set Rs = Db.OpenRecordset("TableName", DB_OPEN_DYNASET)

then use the RS.whatever to achieve what I want

I use DB_OPEN_DYNASET as I more commonly split my databases, if it is not split then use DB_OPEN_TABLE instead

HTH
 

Users who are viewing this thread

Back
Top Bottom