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
Hello,
how can I connect to a MS Access database using the DAO connection??i badly need your help..
See more 

1 reply

Best answer
20
Thank you
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")

Thank you, Broskmojel 20

Something to say? Add comment

CCM has helped 1699 users this month