dbTalk Databases Forums  

Is there a function that returns the path?

comp.database.ms-access comp.database.ms-access


Discuss Is there a function that returns the path? in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Laurontario
 
Posts: n/a

Default Is there a function that returns the path? - 10-09-2004 , 07:07 PM






Hello, everyone,

I am wondering, is there a function that returns the path for a database?
I know that excel has a thisworkbook.path but I did't find anything similar
for Access.
Reason I am asking is that I want to export a query into an Excel file, whic
will be stored in a separate folder (subfolder of my application).
Now, I can put the path inside my code, but what if I want to move the whole
database into another folder?
It would be much easier to use a variable for the path instead of hardcoding
it.

Please help!
Thanks a lot,

L



Reply With Quote
  #2  
Old   
Ken Snell
 
Posts: n/a

Default Re: Is there a function that returns the path? - 10-10-2004 , 01:14 PM






CurrentProject.Path


--

Ken Snell
<MS ACCESS MVP>

"Laurontario" <laur (AT) ontario (DOT) ca> wrote

Quote:
Hello, everyone,

I am wondering, is there a function that returns the path for a database?
I know that excel has a thisworkbook.path but I did't find anything
similar
for Access.
Reason I am asking is that I want to export a query into an Excel file,
whic
will be stored in a separate folder (subfolder of my application).
Now, I can put the path inside my code, but what if I want to move the
whole
database into another folder?
It would be much easier to use a variable for the path instead of
hardcoding
it.

Please help!
Thanks a lot,

L





Reply With Quote
  #3  
Old   
Laurontario
 
Posts: n/a

Default Re: Is there a function that returns the path? - 10-10-2004 , 04:41 PM



Thanks Ken,

It seems that this function is available only in Access 2000 and up.
Any idea what I can use in access 97?

Thanks again,

L

"Ken Snell" <kthsneisllis9 (AT) ncoomcastt (DOT) renaetl> wrote

Quote:
CurrentProject.Path


--

Ken Snell
MS ACCESS MVP

"Laurontario" <laur (AT) ontario (DOT) ca> wrote in message
news:YaGdnUama4jN4PXcRVn-pg (AT) rogers (DOT) com...
Hello, everyone,

I am wondering, is there a function that returns the path for a
database?
I know that excel has a thisworkbook.path but I did't find anything
similar
for Access.
Reason I am asking is that I want to export a query into an Excel file,
whic
will be stored in a separate folder (subfolder of my application).
Now, I can put the path inside my code, but what if I want to move the
whole
database into another folder?
It would be much easier to use a variable for the path instead of
hardcoding
it.

Please help!
Thanks a lot,

L







Reply With Quote
  #4  
Old   
Ken Snell
 
Posts: n/a

Default Re: Is there a function that returns the path? - 10-10-2004 , 08:40 PM



CurrentDb.Name
--

Ken Snell
<MS ACCESS MVP>

"Laurontario" <laur (AT) ontario (DOT) ca> wrote

Quote:
Thanks Ken,

It seems that this function is available only in Access 2000 and up.
Any idea what I can use in access 97?

Thanks again,

L

"Ken Snell" <kthsneisllis9 (AT) ncoomcastt (DOT) renaetl> wrote in message
news:S6udnTGIve2d4fTcRVn-gg (AT) comcast (DOT) com...
CurrentProject.Path


--

Ken Snell
MS ACCESS MVP

"Laurontario" <laur (AT) ontario (DOT) ca> wrote in message
news:YaGdnUama4jN4PXcRVn-pg (AT) rogers (DOT) com...
Hello, everyone,

I am wondering, is there a function that returns the path for a
database?
I know that excel has a thisworkbook.path but I did't find anything
similar
for Access.
Reason I am asking is that I want to export a query into an Excel
file,
whic
will be stored in a separate folder (subfolder of my application).
Now, I can put the path inside my code, but what if I want to move the
whole
database into another folder?
It would be much easier to use a variable for the path instead of
hardcoding
it.

Please help!
Thanks a lot,

L









Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.