Results 1 to 4 of 4
  1. #1
    Flashbond is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    6

    Very easy relative directory question.

    Click image for larger version. 

Name:	Access.PNG 
Views:	14 
Size:	51.8 KB 
ID:	8991


    Fist of all, Hi guys! I am very new to this forum.

    I have an excel file and it is in the same directory with the access file. I want to assign a relative directory to link this xlsx. I tried "..\" trick but it didn't work. The idea is, as you'll guess, I want to use them where ever I move these two files (.accdb and .xlsx) together. I don't want to be bound to a directory address. The magic rule is I don't want to use VBA.

    Any idea?

    Thanks a lot!!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I don't think Access has relative pathing. File must be re-linked. This can be done progammatically.

    VBA can retrieve the current path of the db and set a variable with that string. I don't think macro could do that.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Flashbond is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    6
    Ok, I see... It was because, I don't want to run macro each time I open the document
    Maybe something like "file:///fligt_search_analysis_report.xlsx"?!

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    The code would run so fast, wouldn't even know it was happening. Code could be behind a form set to default open when db opens.

    I doubt macro can be used. I relink with VBA. Example code in http://forums.aspfree.com/microsoft-...ue-323364.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Easy question
    By fyes in forum Programming
    Replies: 1
    Last Post: 12-20-2011, 12:08 AM
  2. Probably a very easy question
    By Ext1jdh in forum Queries
    Replies: 4
    Last Post: 08-02-2011, 12:26 PM
  3. Replies: 6
    Last Post: 06-15-2011, 04:38 PM
  4. Replies: 5
    Last Post: 05-03-2011, 07:55 AM
  5. Easy question
    By Danzig in forum Access
    Replies: 11
    Last Post: 10-28-2010, 06:48 PM

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