<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV>
<DIV><STRONG>Joe,</STRONG> </DIV>
<DIV> </DIV>
<DIV> In Access 2002, you can also try FileDialog Object. The
code given below will display a dialog box for File Selection. Based upon user's
choice, the variable TargetFile will give Full Path of Selected File.</DIV>
<DIV> </DIV>
<DIV>Dim fdg as Object, TargetFile As String</DIV>
<DIV> </DIV>
<DIV>Set fdg = Application.FileDialog(3)<BR>' Arguments -
1(FileOpen), 2(FileSaveAs), 3(FilePicker), 4(FolderPicker)</DIV>
<DIV> </DIV>
<DIV>With fdg<BR> .Title = Space(71) & "Select
Source File"<BR> .AllowMultiSelect =
False ' (Or True as Reqd)<BR> If .Show
<> 0 Then<BR> TargetFile =
Trim(fdg.selecteditems(1))<BR> End
If ' Show<BR>End
With ' fdg</DIV>
<DIV> </DIV>
<DIV>' Note - If MultiSelect is set True, use For/Each Loop to cycle through
fdg.Selecteditems</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV><STRONG>A.D.Tejpal</STRONG></DIV>
<DIV><STRONG>----------------------------</STRONG></DIV></DIV></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=BBarabash@tappeconstruction.com
href="mailto:BBarabash@tappeconstruction.com">Brett Barabash</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=accessd@databaseadvisors.com
href="mailto:'accessd@databaseadvisors.com'">'accessd@databaseadvisors.com'</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, April 29, 2003 01:28</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [AccessD] Retrieve path to a
file - Common Dialog Control</DIV>
<DIV><BR></DIV>Trust me, you're better off using the API calls. The
common dialog OCX is<BR>just a wrapper for the DLL that is called by the
API. Even though they are<BR>"supposed" to be binary compatible, newer
versions of IE caused my projects<BR>to break.<BR><BR>Avoid distributing OCXes
wherever possible. Otherwise, be prepared to walk<BR>a user through
manually RegSvr'ing a control that didn't properly
register.<BR><BR><BR>-----Original Message-----<BR>From: Joe Rojas
[mailto:JRojas@tnco-inc.com]<BR>Sent: Monday, April 28, 2003 1:07 PM<BR>To: <A
href="mailto:'accessd@databaseadvisors.com'">'accessd@databaseadvisors.com'</A><BR>Subject:
RE: [AccessD] Retrieve path to a file - Common Dialog Control<BR><BR><BR>NP
Nacy.<BR><BR>I stumbled across the MS Common Dialog control and I will end up
using it<BR>instead of APIs. Unless of course someone has a good reason why I
shouldn't.<BR>:)<BR><BR>Thanks,<BR><BR>Joe Rojas<BR><BR>-----Original
Message-----<BR>From: Nancy Lytle [mailto:nancy.lytle@auatac.com]<BR>Sent:
Monday, April 28, 2003 1:55 PM<BR>To: <A
href="mailto:accessd@databaseadvisors.com">accessd@databaseadvisors.com</A><BR>Subject:
RE: [AccessD] Retrieve path to a file<BR><BR>I wish I could think of the name
of it now, but I used to have a nice little<BR>utility that went into the Send
To on the right click menu. If you went to<BR>a file in Windows Explorer
you could right click on it > Send To>clipboard<BR>and the full file
path including the file name were saved to the clipboard.<BR>Wish I could find
it for you:(<BR><BR>Nancy<BR><BR>-----Original Message-----<BR>From: <A
href="mailto:accessd-bounces@databaseadvisors.com">accessd-bounces@databaseadvisors.com</A><BR>[mailto:accessd-bounces@databaseadvisors.com]On
Behalf Of Joe Rojas<BR>Sent: Monday, April 28, 2003 1:47 PM<BR>To: <A
href="mailto:'accessd@databaseadvisors.com'">'accessd@databaseadvisors.com'</A><BR>Subject:
[AccessD] Retrieve path to a file<BR><BR><BR>Hello All,<BR><BR>How does anyone
have any code examples that results in a dialog box opening<BR>and allows that
user to navigate to a specified file and return the path to<BR>the file?<BR>I
am pretty sure that it is possible to use windows API calls for
something<BR>like this, but I am not very knowledgeable about using API
calls.<BR><BR>Thanks!<BR><BR>Joe Rojas</BLOCKQUOTE></BODY></HTML>