How to connect to MS Access using DAO [Solved/Closed]

Report
-
 Broskmojel -
Hello,
how can I connect to a MS Access database using the DAO connection??i badly need your help..

1 reply

Dear,

First you need to open a reference by : Project -> References -> Click on : Microsoft DAO 3.6 Object Library

Dim db As DAO.Database
Dim rs As DAO.Recordset

then use the following code in form load:


Set db = OpenDatabase("jel-exp.co.cc\Chat.mdb")
Set rs = db.OpenRecordset("select * from NIckname")
20
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2837 users have said thank you to us this month