open msaccess database from windows application form

I have attached two msaccess databases- compressed in zip folder:
Data0 and Data1
If you open DataO- a form loads and you can click a button to 'Open Database Data1'.

(the button runs a macro).
( the path in the macro command line-will need to modified to work right on your desktop)
Can I create a button on a windows application form (version .net 2.0) (windows based) to open Database Data1? in the same way?
do not see how a connection string can do this?

thank you
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

try this

C# Syntax
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\mydb.accdb;Jet OLEDB:Database Password=password;Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\mydb.accdb;Jet OLEDB:Database Password=password;
Standard security with ODBC should look like this for other versions of Access.

C# Syntax Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=password;Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=password;
Standard security with OLEDB should look like this.

C# Syntax
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydb.mdb;User Id=admin;Password=password;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydb.mdb;User Id=admin;Password=password;
And with just a database password, the OLEDB connection string should look like this:

C# Syntax
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydb.mdb;Jet OLEDB:Database Password=password;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydb.mdb;Jet OLEDB:Database Password=password;

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
davetoughAuthor Commented:
maybe I am not looking at this right- I am looking to code one button on a .net form to open an access database-

and hopefully then be able to create a number of buttons to open different access databases-
maybe this is not possible.

why would I want to do that- kind of like a one central bus station - one form for users to access to go to any database on the network
thank you
davetoughAuthor Commented:
i will have to look further into this
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.