Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Access DB dynamically

Status
Not open for further replies.

AlanCh

MIS
Aug 21, 2001
19
CA
Hello,
I am trying to create an Access mdb file through my VB application. I am currently using the following two lines of code to do so:

Dim NewDB As Database
Set NewDB = CreateDatabase(dbName,dbLangGeneral,dbVersion40)

Where dbName is the name of the mdb file. This creates the mdb file, however when I try to open the db in MS Access 2000 it tells me that it was created using an earlier version of Access. Although all the data is there and the mdb looks fine, I was just wondering why this message appears.

I am using VB6, SP5 ... does this make a difference? I believe this is the latest service pack.

Also, is this using DAO? If so, how do I create a db using ADO?

Thanks,
Alan
 
This is really a VB question rather than an Access question. I suspect it may be to do with the version of DAO that you are using. In one of your code modules, check Tools..references (or it might be under Project...references, it's a while since I've used VB) and see if there is a more recent version of DAO that you can use. Have fun! :eek:)

Alex Middleton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top