A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Application Path?



 
 
Thread Tools Display Modes
  #1  
Old December 7th, 2006, 10:22 AM posted to microsoft.public.access.forms
Sean
external usenet poster
 
Posts: 13
Default Application Path?

Is there code to determine the path of the database?

I compile to MDE which calls for ODBC connections, but I want to switch this
to a 'file dsn' so that each instance of the MDE can have it's own
conenctions to databases.

Sean



  #2  
Old December 7th, 2006, 11:56 AM posted to microsoft.public.access.forms
Brendan Reynolds
external usenet poster
 
Posts: 1,241
Default Application Path?

CurrentProject.Path

Returns the path without the trailing "\" character, so remember to append
that, e.g. ...

strMyDsn = CurrentProject.Path & "\MyDsn.dsn"

--
Brendan Reynolds
Access MVP


"Sean" wrote in message
...
Is there code to determine the path of the database?

I compile to MDE which calls for ODBC connections, but I want to switch
this to a 'file dsn' so that each instance of the MDE can have it's own
conenctions to databases.

Sean




  #3  
Old December 7th, 2006, 02:44 PM posted to microsoft.public.access.forms
Sean
external usenet poster
 
Posts: 13
Default Application Path?

Many thanks.

"Brendan Reynolds" wrote in message
...
CurrentProject.Path

Returns the path without the trailing "\" character, so remember to append
that, e.g. ...

strMyDsn = CurrentProject.Path & "\MyDsn.dsn"

--
Brendan Reynolds
Access MVP


"Sean" wrote in message
...
Is there code to determine the path of the database?

I compile to MDE which calls for ODBC connections, but I want to switch
this to a 'file dsn' so that each instance of the MDE can have it's own
conenctions to databases.

Sean







 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.