As in the sample article, say you modify the code to:
Dim strImagePath As String
On Error Goto PictureNotAvailable
strImagePath = "C:\some path to a directory\"
strImagePath = strImagePath & Me.txtImageName
'......
You can pass the folder path to your sample code
Function SampleCode(MyFolderPath As String)
Dim strImagePath As String
'.... code as in the sample article
strImagePath = MyFolderPath & Me.txtImageName
Eric
--------------------
| Thread-Topic: Photo Paths
| thread-index: AcP3f0/1QAI4w2EES1G1kHYgj9sagg==
| X-Tomcat-NG: microsoft.public.access.forms
| From: "=?Utf-8?B?Tk1leCBSb24=?=" <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
| Subject: RE: Photo Paths
| Date: Thu, 19 Feb 2004 23:01:07 -0800
| Lines: 57
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.forms
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.forms:255983
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.access.forms
|
| The example given in the link you gave says to list the path and file
name.
"Open the tblImage table in Datasheet view, and then add the path and the
name of a bitmap file to each record."
My post is asking for clarification of Stephan Schapel's advice:
"Remember you really should not store the full path rather only the
filename. Simply set the path at runtime prior to loading the photos
into
an Image control."
----- \"prabha\" wrote: -----
See:
ACC2000: How to Display an Image from a Folder in a Form or in a Report
http://support.microsoft.com/default.aspx?scid=kb;en-us;210100
--------------------
| Thread-Topic: Photo Paths
| thread-index: AcP11qDz1lXZ0uGBTE++okugFAwPCg==
| X-Tomcat-NG: microsoft.public.access.forms
| From: "=?Utf-8?B?Tk1leCBSb24=?="
<
[email protected]>
| Subject: Photo Paths
| Date: Tue, 17 Feb 2004 20:21:06 -0800
| Lines: 12
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.forms
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.forms:255633
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.access.forms
|
| Stephan,
You said this in your last reply:
"Remember you really should not store the full path rather only the
filename. Simply set the path at runtime prior to loading the photos
into
an Image control."
How and where do I 'set the path at runtime' ?
---------------------
Thanks again
Ron
|
|