Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get App.Path to work in Access 1

Status
Not open for further replies.

leonepaolo

Programmer
May 28, 2001
82
0
0
CA
Hi,

I trying to create a program that'll run off a USB drive and as such I won't always know the path of the application.

I tried a couple of the methods on this site but I must be missing a reference. I'm really hoping for a simple straight forward solution as I'm not sharing the data.

Borvik posted:

Public Function Path() As String
'App.Path
Return System.AppDomain.CurrentDomain.BaseDirectory
End Function

and followed it up with

Imports System.Reflection.Assembly

I have no idea how to merge the two.

Also, I get variable not defined errors and the code shows up in red.

I'd really appreciate any comments or recommendations.

Thanks in advance,
Paolo
 
leonepaolo,
I think your looking for [tt]CurrentProject.Path[/tt], the other stuff is regular VB.

Hope this helps,
CMP

(GMT-07:00) Mountain Time (US & Canada)
 
Thank You CautionMP.
Thank You CautionMP.
Thank You CautionMP.
and THANK YOU!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top