473,698 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to receive the current folder location as string

Dear Access friends,

How can I load a string with his own folder address.

The following code addressed to the system folder of MS programs.

Application.Sys Cmd(acSysCmdAcc essDir)

But now I need a string with the current location, the same location in
which I have started the application.

Thanks for any help,

Simon
Oct 21 '06 #1
1 3611
To obtain the path in which the current Access database resides (which may
not be the current folder): CurrentDB.Name.

The current folder (aka directory) is returned by CurDir. Here's the Access
2002 Help on CurDir:

CurDir Function
Returns a Variant (String) representing the current path.

Syntax

CurDir[(drive)]

The optional drive argument is a string expression that specifies an
existing drive. If no drive is specified or if drive is a zero-length string
(""), CurDir returns the path for the current drive. On the Macintosh,
CurDir ignores any drive specified and simply returns the path for the
current drive.

Larry Linson

Microsoft Access MVP

"Simon" <Sv********@Ver satel.nlwrote in message
news:45******** *************** @news.tele2.nl. ..
Dear Access friends,

How can I load a string with his own folder address.

The following code addressed to the system folder of MS programs.

Application.Sys Cmd(acSysCmdAcc essDir)

But now I need a string with the current location, the same location in
which I have started the application.

Thanks for any help,

Simon


Oct 21 '06 #2

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

Similar topics

3
1586
by: LC | last post by:
Hi, I would like to know how I can save my current ASP page to the server side in html file format. Then I would like to stream it back to the client side. Any help is very much appreciated. Thanks,
2
1368
by: LC | last post by:
Hi, Many Weeks ago I posted this: I would like to know how I can save my current ASP page to the server side in html file format. I got a very nice reply back from Scott McNair. Thank you very much Scott. This code was provided by Scott:
5
8110
by: MattG | last post by:
Can someone point me towards something explaining how to overwrite an exe that is currently being executed, if even possible? I'm trying to build in an update routine to ahve it look for a newer version of itself on the network and then copying that new version on itself... of course I keep getting an IOException because the file is 'In use by another Process' Thanks a bunch,
6
17195
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically, process and output to the screen in my application when a message arrived. But the problem is how do I read the SMS message immediately when it arrived without my handphone BeEPINg for new message ? I read up the AT commands, but when getting down...
3
1872
by: News | last post by:
Does anyone know how to get the file spec of DLL from within the code? I thought that System.Reflection.GetExecutingAssembly() would work, but it returns the name of the program that called DLL routine, not the DLL file itself. Mike Buchanan
1
2627
by: Sajjad Akhter | last post by:
Hi, Issue at hand is that i want to have common build scripts, but people may be multiple version (source trees) on single machine. How can i traverse parent tree. so what i thought is that i would put ..\env.Build file when it reaches to root (where it knows location of common scripts). then it will init variable to that folder.
9
3708
by: Nick 'The Database Guy' | last post by:
Hi All, I want to browse to a particular folder, not a particular file. The reason for this is that I have a utility that asks people to browse to a certain file, and I want them to be able to choose the location that they start browsing. Thanks in advance.
9
2916
by: Keith G Hicks | last post by:
I'm having a lot of trouble with "file in use" errors in my "folder watcher" project. Starting and stopping the watcher and reading my XML file work fine. Once the watcher is started, I'm reading the text files from the watched folder line by line into variables and then posting them to a SQL table. All of the code for the form is shown below. And it works fine except for 2 issues. First issue: In the Finally of the Try for teh SQL...
8
5210
by: Mateusz Viste | last post by:
Hi, I'm not sure if my question is really related to JavaScript, so please excuse me if that's not the case (and maybe you guys would have an idea what's the cause is and where could I ask)... I recently put the following script online: <script type="text/javascript"><!-- function playmedia(mediafile) { newwindow=window.open(); if (window.focus) {newwindow.focus()} newwindow.document.write('<html>');
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9027
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.