<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2719.2200" name=GENERATOR>
<STYLE>@font-face {
font-family: Tahoma;
}
P.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt
}
LI.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt
}
DIV.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt
}
H2 {
FONT-FAMILY: Arial; FONT-SIZE: 14pt; FONT-STYLE: italic; FONT-WEIGHT: bold; MARGIN: 12pt 0cm 3pt
}
H3 {
FONT-FAMILY: Arial; FONT-SIZE: 13pt; FONT-WEIGHT: bold; MARGIN: 12pt 0cm 3pt
}
H4 {
FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; MARGIN: 3pt 0cm
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
P {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm
}
P.Code {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
LI.Code {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
DIV.Code {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
P.code0 {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
LI.code0 {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
DIV.code0 {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
SPAN.emailstyle19 {
COLOR: navy; FONT-FAMILY: Arial
}
SPAN.EmailStyle21 {
COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=803403419-12032003><FONT color=#0000ff
size=2>Virginia,</FONT></SPAN></DIV>
<DIV><SPAN class=803403419-12032003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=803403419-12032003><FONT color=#0000ff size=2>If I was doing it
I would add code that checks the path name and reject all path names that start
with a drive letter and only accept UNC path names. Thus, the only drives
on their computers that pass are shared drives.</FONT></SPAN></DIV>
<DIV> </DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-us><B><FONT face=Arial color=#0000ff>Charles
Wortz</FONT></B></SPAN> <BR><SPAN lang=en-us><FONT face=Arial
color=#0000ff>Software Development Division</FONT></SPAN> <BR><SPAN
lang=en-us><FONT face=Arial color=#0000ff>Texas Education Agency</FONT></SPAN>
<BR><SPAN lang=en-us><FONT face=Arial color=#0000ff>1701 N. Congress
Ave</FONT></SPAN> <BR><SPAN lang=en-us><FONT face=Arial color=#0000ff>Austin, TX
78701-1494</FONT></SPAN> <BR><SPAN lang=en-us><FONT face=Arial
color=#0000ff>512-463-9493</FONT></SPAN> <BR><SPAN lang=en-us><FONT face=Arial
color=#0000ff>CWortz@tea.state.tx.us</FONT></SPAN> </P>
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Hollis,Virginia
[mailto:HollisVJ@pgdp.usec.com] <BR><B>Sent:</B> Wednesday 2003 Mar 12
13:16<BR><B>To:</B> 'accessd@databaseadvisors.com'<BR><B>Subject:</B> RE:
[AccessD] Adding Attachments<BR><BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=930540919-12032003>Is
there a way to have the attachment saved (moved?) to a common network drive, or
the directory the database is stored?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=930540919-12032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=930540919-12032003>I got
to thinking, there will be the user that will attach a file that is stored on
their computer, which obviously will make it unavailable to everyone that needs
the attachment.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=930540919-12032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=930540919-12032003>Virginia</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=930540919-12032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=930540919-12032003></SPAN></FONT> </DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Arthur Fuller
[mailto:artful@rogers.com]<BR><B>Sent:</B> Wednesday, March 12, 2003 7:09
AM<BR><B>To:</B> accessd@databaseadvisors.com<BR><B>Subject:</B> RE: [AccessD]
Adding Attachments<BR><BR></DIV></FONT>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">On my forms I have
the text field beside a little button whose text is just 3 dots. The OnClick
fires the code I posted. The user navigates to a file and selects ok, then the
code plugs the complete filename into the text field (in this case
BigImagePath).</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B>
accessd-admin@databaseadvisors.com [mailto:accessd-admin@databaseadvisors.com]
<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of
</SPAN></B>Hollis,Virginia<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> March 11, 2003 12:34 PM<BR><B><SPAN
style="FONT-WEIGHT: bold">To:</SPAN></B>
'accessd@databaseadvisors.com'<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [AccessD] Adding
Attachments</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=blue
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Ok, I
found Sub TestGetFileName() in ADH.</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=blue
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">You
mentioned posting the results to a control. Do I need to have a button on the
form that opens the GetFileName? Then what transfers this file name to the
field?</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=blue
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Virginia</SPAN></FONT></P></DIV>
<BLOCKQUOTE style="MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt; MARGIN-RIGHT: 0cm">
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 36pt; MARGIN-RIGHT: 0cm"><FONT
face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Arthur
Fuller [mailto:artful@rogers.com]<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, March 11, 2003 10:20
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
accessd@databaseadvisors.com<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [AccessD] Adding
Attachments</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">You
don’t need to use URLs if you don’t want to. I use code from ADH that calls
the Windows API to open the GetFile dialog, then posts the result to a
control on my form, like so:</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
With Me</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
.BigImagePath = ahtCommonFileOpenSave()</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
End With</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">To
cohere to the licensing I cannot post said function or its API declaration.
Of course I could change all the variable names and the function name and
claim it as my own work, which is how I learned to program, but now that I’m
an old fart I don’t do that any more.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">(Fuller’s Law #3:
You start out a Young Turk and before you know it you’re an Old
Fart.)</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The
function called above returns an absolute path, but given same and knowledge
of the app directory, it’s a simple matter to replace the app path with a
relative reference. The Replace function does it in one
line:</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
Replace( strExp as String, strFind as String, strReplace as String
)</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">HTH,</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">A.</SPAN></FONT></P></BLOCKQUOTE></DIV></BLOCKQUOTE></BODY></HTML>