473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

AppPath in A97?

MLH
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
....
(I know nothing from this point)
Jan 8 '06 #1
5 1380
MLH wrote in message <rg********************************@4ax.com> :
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
...
(I know nothing from this point)


I don't know anything about installation thingies, but from within
a db, you can use for instance

currentdb.name ' or dbs.name (do a msgbox to just display it)

this will return path and name to the db, so you probably need to strip
of the name part of it.

--
Roy-Vidar
Jan 8 '06 #2
MLH <CR**@NorthState.net> wrote in news:rg42s1pcd32hlggqco1q25vmhncija635j@
4ax.com:
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
...
(I know nothing from this point)


Public Function PathOfCurrentDB() As String
' static notion per Peter Cozens
Static Path As String
If Len(Path) = 0 Then
Path = CurrentDb.Name
Path = Left$(Path, Len(Path) - Len(Dir$(Path)))
End If
PathOfCurrentDB = Path
End Function

--
Lyle Fairfield
Jan 8 '06 #3


Dim dbName As String
Dim dbPath As String
Dim db As DAO.Database

Set db = CurrentDb
dbName = db.Name
dbPath = Left(dbName, InStr(dbName, Dir(dbName)) - 1)

--
Terry Kreft

"MLH" <CR**@NorthState.net> wrote in message
news:rg********************************@4ax.com...
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
...
(I know nothing from this point)

Jan 8 '06 #4
Whoops, sorry

dbPath = Left(dbName, InStr(dbName, Dir(dbName)) - 1)

Should be
dbPath = Left(dbName, Len(dbName) - Len(Dir(dbName)))

--
Terry Kreft

"Terry Kreft" <te*********@mps.co.uk> wrote in message
news:YY********************@karoo.co.uk...


Dim dbName As String
Dim dbPath As String
Dim db As DAO.Database

Set db = CurrentDb
dbName = db.Name
dbPath = Left(dbName, InStr(dbName, Dir(dbName)) - 1)

--
Terry Kreft

"MLH" <CR**@NorthState.net> wrote in message
news:rg********************************@4ax.com...
I was wondering if there was some property whose
value I could read from a DAO snippet to tell me the
current AppPath in a runtime setting. If I give someone
an installation disk, that person could install the runtime
files into any target target dir. I would like to determine
that internally somehow. Using the following, could you
contribute a line or two that would produce the App
Path?
Dim dbs As Database
Set dbs = CurrentDb
...
(I know nothing from this point)


Jan 8 '06 #5
MLH
Thx, guys. All good suggestions.
Jan 11 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Shashank Date | last post by:
VB Gurus, I have developed a VB 6.0 application on WIN XP Pro which I am trying to deploy on another machine on the network which is running Win 2000 Pro. I am using the "Package & Deployment...
3
by: Phil Lamey | last post by:
Hi All, I have the following code but for some reason I cannot get the Session_OnEnd event to fire. I am trying to limit the amount of connections a browser session can have. Where the...
2
by: Arjen | last post by:
Hello, I want to check if an directory exist. Directory.Exists(Application + "/Uploads/") I'm doing this inside a asp.net web project in a class file. Here is the error message. The name...
1
by: dave | last post by:
I need to put the port for my server to get to my web site. example: http://mysite:81 when I use Application("AppPath") , it dumps the :81 What can I do???
0
by: msn | last post by:
I have the Sub in global.asa. It works on my server, but does not work when I upload to the web server? img src="<%= Application("AppPath")%>/images/btn_topslash2.gif" Sub...
2
by: Arjen | last post by:
Hi, Is this Application + "/error.aspx" and this "~/error.aspx" always the same?
7
by: Analia Beltran | last post by:
Hi How do I get the path where application is running? TIA A.B.
4
by: Roshawn Dawson | last post by:
Hi, I've tried my best to convert the C# code below to it's VB equivalent. I've even used all of the free code converters there are on the net, but none can get this right. Here is the code: ...
4
by: gs | last post by:
Dim appPathFn As String appPathFn = System.Windows.Forms.Application.ExecutablePath Windows is not a member of System I saw come code in the internet as appPathFn =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.