467,114 Members | 1,263 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,114 developers. It's quick & easy.

association

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
  • viewed: 979
Share:
1 Reply
1GB
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.

Similar topics

7 posts views Thread by steve | last post: by
reply views Thread by Stefano Noferi | last post: by
2 posts views Thread by David | last post: by
3 posts views Thread by Bret Pehrson | last post: by
6 posts views Thread by Nak | last post: by
1 post views Thread by Doug Bell | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.