How to connect to MS Access using DAO
Solved/Closed
Hello,
how can I connect to a MS Access database using the DAO connection??i badly need your help..
how can I connect to a MS Access database using the DAO connection??i badly need your help..
Related:
- Vba dao connection example
- Vba case like - Guide
- F panel connection - Guide
- Mute usb connection sound - Guide
- Steam no connection - Guide
- Sound card connection - Guide
1 response
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")
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")