[AccessD] Relative reference?

Stuart McLachlan stuart at lexacorp.com.pg
Mon Jun 30 17:49:19 CDT 2008


No, the default directory for an Access DB is not the directory continaing the database.
It's usually the users "My Documents", but this can be changed  using Tools-Options.

The location of the database (without a trailing "\") is  returned by CurrentProject.Path.
so you would use something like

strFilename = "TinaDonationTestLtr2.doc"
strFullFilename = CurrentProject.Path & "\" &  strFilename


On 30 Jun 2008 at 7:50, Tina Norris Fields wrote:

> Hi All,
> 
> Can I use relative reference to point to a file from within Access.  In 
> other words, if the database and the Word document are in the same 
> directory (in this case "TinaVersions"), can I use
> ".\TinaDonationTestLtr2.doc" instead of the complete pathname 
> "C:\Documents and Settings\Tina\My 
> Documents\TP\TP_Clients\Habitat\TinaVersions\TinaDonationTestLtr2.doc" 
> in my Sub?
> 
> I would very much like to be able to use relative rather than absolute 
> reference if that is "do-able."
> 
> Thanks
> Tina
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com





More information about the AccessD mailing list