Create an Access Database

Category:
Database
Type:
Snippets
Difficulty:
Beginning
Author:
Intelligent Solutions Inc.

Version Compatibility:

More information:
Shows you how to create an Access Database using DAO. Adds one table (specified by a parameter) and one field (ID, long), but it should be clear how to change the code to do more.

Note: Don't reference DAO 3.60 if you want to be able to open the database in Access '97. Reference DAO 3.50 or 3.51. If you only need to open the database in Access 2000 (or don't need to open the db in Access at all), you can reference 3.60.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: