By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,593 Members | 2,006 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,593 IT Pros & Developers. It's quick & easy.

association

P: 4
i am searching for an answer but i'm not sure how to ask the question. in the program visual basic 6 i am writing i have a access file and a seprate folder that are associated with my program. the program, file, and folder are all located on my flash drive so becouse of the need to transport it to class. in the program both the access file and folder are located on the L drive (the name of the flash drive at my house), but at school the flash drive is located on the H drive. this causes a lot of changes in the program when coming from or going to school. this got me thinking; when i finish the program it would have to remain in the same place it was created and if the drive letter were to change i would loose the programs use. is their a way to make a file or folder moveable or reletive to the program so you can install it on any drive you wish.
Nov 16 '06 #1
Share this Question
Share on Google+
1 Reply


100+
P: 1,646
i am searching for an answer but i'm not sure how to ask the question. in the program visual basic 6 i am writing i have a access file and a seprate folder that are associated with my program. the program, file, and folder are all located on my flash drive so becouse of the need to transport it to class. in the program both the access file and folder are located on the L drive (the name of the flash drive at my house), but at school the flash drive is located on the H drive. this causes a lot of changes in the program when coming from or going to school. this got me thinking; when i finish the program it would have to remain in the same place it was created and if the drive letter were to change i would loose the programs use. is their a way to make a file or folder moveable or reletive to the program so you can install it on any drive you wish.
Hi. good question.
This will work;
Expand|Select|Wrap|Line Numbers
  1. Dim strPath As String
  2. Dim strDatabase As String
  3.  
  4. strPath = App.Path()
  5. strDatabase = strPath & "\YourDatabaseFolder\YourAccessName.mdb"
  6.  
  7.  
Nov 16 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.