Dear Sir,

Let me know how to connect a access database in Visual basic 6.

if you are looking for the connection string please find it here.

you can do it very easily. just put a data control. in properties slelect connection type access (if you want to connect office 2000 or next version you need service pack 6). and select the location of file. and then in record source select the table.

There is another way depending upon what version of VB you have.

Start new standard exe project
Goto vb's ide menu Add-Ins > select add-in manager.
Look for VB 6 Data Form Wizard, highlight > Look at frame in bottom right corner with caption Load Behavior > select Loaded/Unloaded so check mark displays in check box. > OK
VB IDE Menu Add-Ins > Data Form Wizard
Run through wizard selecting your access database via browse button on screen 3.
On next form enter the name of the form you want, the style, and the type. I would suggest to start off with the ADO Code unless this is the first time you have ever played with VB.

Actually I would suggest that you use each option with each type and save that as a test project for reference. Then you will have it for reference.

Good Luck

Nice post vb5prgrmr - wish I had though of that when I started using access with vb6 lol :)

As for using Access, Comatose posted a sticky in the VB4/5/6 section about this very subject - http://www.daniweb.com/forums/thread41057.html

I think vb5prgrmr's idea would be easier if you're unsure what you're doing though! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.