Greetings!

" Visual Basic 6 Program"

I want to open the database file base on the given filename. If the database file is present all data that i want to save will be save in this database. Else, if the database is not present it will create new database to save the data.

My idea is to make temporary database to copy all fields if the database is not present.
Tempory database will be a initial database if the given filename is not present then when i use it into my program then i will save this into another filename.

* the purpose of this is to monitor my monthly report in a year i want to separate all database file every month..

Anybody know how to determine if the database is present or not... If anybody can provide a syntax or logic for me it is a huge help..

thank you in advance

1st answer: assuming you want to create ms access database . check if the file exist in your database folder (.mdb) then use the CopyFile App.Path to copy or create your database.

2nd answer: temporary database using ms access dont need to create a file because the database/table exist only during runtime. so filename doesnt really matter.

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.