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

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

1 reply


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("\Chat.mdb")
Set rs = db.OpenRecordset("select * from NIckname")
Thank you

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

CCM 2942 users have said thank you to us this month