How to Reference the Application Folder Chosen by the User in the Installation Routin

clg
09-02-2005, 06:22 AM
I have written a program with an Access database as the datasource. I have directed the Access database to be installed in the "Application Directory". This is all working fine, but now I want to be able to allow the user to choose where they want to install the program, therefore I believe my Access database will follow. How can I reference the location of the "Application Folder" chosen by the user so that I can find my data?

by_m
09-02-2005, 09:10 PM
You can access it based off of the location of your .exe file. From what you said it sounds like both files will be in the "Application Directory". To direct it based on the location of the .exe file you can use this:

AccessDatabaseLocation = Application.StartupPath & "\Access_DB_Name.mdb"

That would give the full path to the folder containing the executable (but not including the executable file name), just add the name of your DB.

clg
09-12-2005, 07:09 PM
Thanks! That's exactly what I needed.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum