Results 1 to 9 of 9
  1. #1
    TerraEarth is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    86

    Changing your Access database directory?

    If I decide to place my access database file in another location, I would have to also change numerous filePaths used in my code to fit the new directory location.

    This is because in my access database, several files/folders are referenced within my database folder (the folder containing my access database).

    Is there an elegant way of handling this? I was thinking of two solutions:



    1) Have a table with a single value, single field that indicates the filepath to be used and all modules that use file paths in their code will reference this new table for the current value of the directory.

    2) Standardize all file paths to point to a generic drive (the C:/ drive for example) and leave an instruction to always place the file in that particular drive on their PCs.

    Any suggestions?

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,406
    http://jrsoftware.org/isinfo.php
    Check out this link. I used inno a few years ago to install Access applications. As I recall, it will set up any directory structure you need on the target computer.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Just use CurrentProject.Path in your code to get the path of the front-end (folder) or CurrentProject.FullName to include the name of the front-end file.

    Cheers,
    Vlad

  4. #4
    TerraEarth is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    86
    Quote Originally Posted by Gicu View Post
    Just use CurrentProject.Path in your code to get the path of the front-end (folder) or CurrentProject.FullName to include the name of the front-end file.
    This is wild.

  5. #5
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Like in "it works" ?

  6. #6
    TerraEarth is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    86
    As in "I want off this ride but the brakes tore off yesterday."

  7. #7
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,406
    I don't want to be the bad boy here, but this needs to be said.
    TerraEatth, show some respect for those why try to help you, especially those that solve your problems or spend considerable time investigating a solution.
    Gicu suggested a solution. Your response: "This is wild". That conveyed NO intelligence on whether it helped you or not.
    So, Gicu asked you directly if it helped. Your response was "I want off this ride but the brakes tore off yesterday."
    TerraEarth, this behavior is a fast way to get on the forum user's Ignore List. Gicu might be reluctant to respond to any of your future posts (as might I and others).

    A more appropriate response would be to either point out that the suggestion did not help because...
    or THANK YOU!

  8. #8
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Thanks davegri!

    Vlad

  9. #9
    TerraEarth is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    86
    Maybe I should elaborate.

    When I said "this is wild" this was me expressing my excitement at discovering a solution provided by another user. It was a very simple solution and yet it directly solved the issue I was facing and I found it to be rather cool in that sense or in another phrase - wild. I marked the thread as solved immediately after the response. I don't think Gicu took offense to my response, but if he did I want to say that I meant no offense and that he did indeed helped me. The "I want off this ride but the brakes tore off yesterday." was meant to be a humorous response indicating how blown away I was - as if I was on a ride with no brakes!

    I don't feel as if I'm entitled to responses and if you or anyone else feels for whatever reason that they never want to respond to my threads ever again - I am okay with that. I do think that this forum and its constituent users are very helpful. Thank you all!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Changing Word Doc into Access Database
    By rfschmeck in forum Misc
    Replies: 1
    Last Post: 09-07-2017, 09:11 AM
  2. Replies: 5
    Last Post: 06-26-2013, 11:40 AM
  3. Replies: 6
    Last Post: 06-15-2011, 04:38 PM
  4. Directory Database
    By bwaters in forum Access
    Replies: 1
    Last Post: 10-29-2010, 05:51 AM
  5. Replies: 1
    Last Post: 07-12-2010, 08:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums