
Re Data Control with ADO msjet 3.6 Libaray
Can anybody help I am trying to use a Data Control to load a DB from Access
2000 (DAO 3.6 Object Library). When I try to load the DB in to the Data
Control I get the message (Couldn't use `C:\VB Work\VB6\VB6
Projects\Lac_DataForm1\LAC1.mdb`;file already in use.). The code below is
now I am trying load the DB.
Dim ws As Workspace
Dim Mdb As Database
Dim g_ds_members As Recordset
' Create Microsoft Jet Workspace object.
Set ws = CreateWorkspace("", "admin", "", dbUseJet)
' Initialise the database and dynaset object.
Set Mdb = ws.OpenDatabase(App.Path & "\LAC1.mdb", True)
frmMembers!dc_members.DatabaseName = App.Path & "\LAC1.mdb"
Set g_ds_members = Mdb.OpenRecordset("SELECT * from members")
Thanks
Rick Jackson