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

IRApublic - Dec 6, 2009 at 06:27 AM - Latest reply:  Broskmojel
- Apr 7, 2010 at 09:12 PM
how can I connect to a MS Access database using the DAO connection??i badly need your help..
See more 

1 reply

Best answer
Thank you

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, Broskmojel 20

Something to say? Add comment

CCM has helped 1699 users this month