473,466 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Application.CurrentProject.Path question on storing

47 New Member
Can this be saved somehow in a field in the database along with some other address criteria, so I can always be looking at the current location.
like this?

Application.CurrentProject.Path\year\month\nbr 9.jpg

and when pulled out, you get

C:\Folder1\year\month\nbr 9.jpg

with C:\Folder1 being the current path


Thank you for your help
Ken
Dec 17 '07 #1
5 9259
NeoPa
32,556 Recognized Expert Moderator MVP
I'm confused by this question.
The database path is relative to where the database was opened from so storing this value as data would seem to make no sense at all. Clearly there are ways of storing any data you want to, but this seems a strange request.
Can you explain what you want exactly and why?
Dec 17 '07 #2
akirekab
47 New Member
I'm confused by this question.
The database path is relative to where the database was opened from so storing this value as data would seem to make no sense at all. Clearly there are ways of storing any data you want to, but this seems a strange request.
Can you explain what you want exactly and why?
I am wanting to display image on form, the image file location can change, but will always be relative to the database location. I was storing the location, ie
c:\xxxx etc, but when file was moved to new folder, of course the image couldnt be found. So I am trying to establish a way (remember I am new at this part) to create the new address, by adding the relative location of db to file name.
thank You
Dec 17 '07 #3
NeoPa
32,556 Recognized Expert Moderator MVP
OK.
I was surprised as I saw you were almost there already.
Indeed, you want to use Application.CurrentProject.Path to find the file if it is relative to the database location.
Something like :
Expand|Select|Wrap|Line Numbers
  1. strImage = Application.CurrentProject.Path & "\year\month\nbr 9.jpg"
Dec 17 '07 #4
akirekab
47 New Member
OK.
I was surprised as I saw you were almost there already.
Indeed, you want to use Application.CurrentProject.Path to find the file if it is relative to the database location.
Something like :
Expand|Select|Wrap|Line Numbers
  1. strImage = Application.CurrentProject.Path & "\year\month\nbr 9.jpg"
Thanks appreciate it

I am using "Private FSO as Scripting.FileSystemObject" to see if this file exists.
1. What reference in Access 2002 is necessary for this
2. I have seen many syntax, for the exists part, but mine is not working
can you help me there or is this overstepping my bounds. In other words should I start a new string
Dec 17 '07 #5
NeoPa
32,556 Recognized Expert Moderator MVP
I think a new thread is required here, but for determining if a file exists I use the function :
Expand|Select|Wrap|Line Numbers
  1. 'Exist returns true if strFile exists.
  2. '22/05/2003 Rewritten with better code.
  3. '20/05/2005 Added finding of R/O, System & Hidden files
  4. Public Function Exist(strFile As String, _
  5.                       Optional intAttrib As Integer = &H7) As Boolean
  6.     Exist = (Dir(PathName:=strFile, Attributes:=intAttrib) <> "")
  7. End Function
Dec 17 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Hal Vaughan | last post by:
I want to have a config file for my program, which means I need to know where the config file is. If I type: java myclass and it runs myclass.class, is there any way to obtain the location of...
2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
2
by: Jim's wife | last post by:
How can I access the application path in access 2000? curdir shows me the documents abd settings directory. I want to be able to access the directory where my .mdb is put using code. Thanks
7
by: lauren quantrell | last post by:
Wondering if anyone has already written a snippet that will loop through every form, report, module in an ADP application and do application.SaveAsText on each item.
7
by: Greg Collins [MVP] | last post by:
Hi, I couldn't find what I was looking for by searching the newsgroup, but perhaps these have already been discussed somewhere. This is a bit long with a lot of interrelated questions. What I've...
1
by: carmela_wong | last post by:
Hello all, I had a database in MS Access 2003 which I converted to Access 97. The "CurrentProject" object causes an error in the code that was automatically written by Access when I created the...
3
by: John Phelan-Cummings | last post by:
I have a front-end application called, “inbusiness.mdb” and three back-ends databases called, “inbusinessClient_be.mdb”, “inbusinessFund_be.mdb”, and, “inbusiness_be”. I created three back-ends...
0
by: =?Utf-8?B?SkhhbGV5?= | last post by:
Our system is: IIS Server: dual Intel Xeon 2.80 GHz, 4 GB Ram Windows Server 2003 SP2 IIS 6.0 SQL Server: dual Intel Xeon 2.80 GHz, 4 GB Ram (separate server) Windows Server 2003 SP2 SQL...
3
by: lilOlMe | last post by:
Hi there, I'm developing a ASP.NET application using VB.NET as the server side code. In my application, I have a directory that holds temporary resources for the duration of a user's stay on my...
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
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,...
0
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...
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.