<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1141" name=GENERATOR>
<STYLE>@font-face {
font-family: Tahoma;
}
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
H2 {
FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN: 12pt 0cm 3pt; FONT-STYLE: italic; FONT-FAMILY: Arial
}
H3 {
FONT-WEIGHT: bold; FONT-SIZE: 13pt; MARGIN: 12pt 0cm 3pt; FONT-FAMILY: Arial
}
H4 {
FONT-WEIGHT: bold; FONT-SIZE: 12pt; MARGIN: 3pt 0cm; FONT-FAMILY: Arial
}
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-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman"
}
P.Code {
FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; FONT-FAMILY: "Courier New"; punctuation-wrap: simple
}
LI.Code {
FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; FONT-FAMILY: "Courier New"; punctuation-wrap: simple
}
DIV.Code {
FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; FONT-FAMILY: "Courier New"; punctuation-wrap: simple
}
P.code0 {
FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; FONT-FAMILY: "Courier New"; punctuation-wrap: simple
}
LI.code0 {
FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; FONT-FAMILY: "Courier New"; punctuation-wrap: simple
}
DIV.code0 {
FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; FONT-FAMILY: "Courier New"; 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=302432817-13032003><FONT face=Arial color=#0000ff size=2>Add a
reference to the "Microsoft Scripting Runtime"</FONT></SPAN></DIV>
<DIV><SPAN class=302432817-13032003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=302432817-13032003>
<DIV align=left><FONT face=Arial size=2>Doris Manning</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Database Administrator</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Hargrove Inc.</FONT></DIV>
<DIV align=left><FONT face=Arial color=#0000ff
size=2><U>www.hargroveinc.com</U></FONT></DIV></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-admin@databaseadvisors.com [mailto:accessd-admin@databaseadvisors.com]
<B>On Behalf Of </B>Hollis,Virginia<BR><B>Sent:</B> Thursday, March 13, 2003
11:21 AM<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=760151716-13032003>I
get User defined type not defined Error on: Dim fso As
FileSystemObject</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=760151716-13032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=760151716-13032003>This
is in 97, does that make a difference?</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Mike and Doris Manning
[mailto:mikedorism@ntelos.net]<BR><B>Sent:</B> Thursday, March 13, 2003
10:03 AM<BR><B>To:</B> accessd@databaseadvisors.com<BR><B>Subject:</B> RE:
[AccessD] Adding Attachments<BR><BR></DIV></FONT>
<DIV><SPAN class=906185715-13032003><FONT face=Arial color=#0000ff
size=2>You have to do a FileCopy from the first selected location to the
second selected location in order to actually move the
file.</FONT></SPAN></DIV>
<DIV><SPAN class=906185715-13032003><FONT face=Arial color=#0000ff
size=2><BR>Public Sub MoveFile(strOldPath As String, strOldName As String,
_<BR>
strNewPath As String, strNewName As
String)<BR>
<BR> On Error GoTo ErrorHandler<BR>
<BR> Dim fso As FileSystemObject<BR> Dim
strOldFile As
String<BR>
<BR> DoCmd.Hourglass True<BR>
<BR> strOldFile = strOldPath &
strOldName<BR> <BR> If Dir(strNewPath,
vbDirectory) = "" Then<BR> Set fso
= New FileSystemObject<BR>
fso.CreateFolder strNewPath<BR> End
If<BR> <BR> FileCopy strOldFile,
strNewName<BR>
<BR> DoCmd.Hourglass False<BR>
<BR> Exit Sub<BR>
<BR>ErrorHandler:<BR> Call HandleErrors(Err, strMyName,
"MoveFile")<BR>End Sub<BR></DIV>
<DIV>
<DIV align=left><FONT face=Arial size=2>Doris Manning</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Database Administrator</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Hargrove Inc.</FONT></DIV>
<DIV align=left><FONT face=Arial color=#0000ff
size=2><U>www.hargroveinc.com</U></FONT></DIV></DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-admin@databaseadvisors.com
[mailto:accessd-admin@databaseadvisors.com] <B>On Behalf Of
</B>Hollis,Virginia<BR><B>Sent:</B> Thursday, March 13, 2003 10:29
AM<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=940541715-13032003>I have been playing around with the dialog to
Save the file to a specified folder. Tell me if anyone thinks this
will work...</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003>Use the Open file dialog so the user can select
the file they need to attach. Then the Save dialog box opens to the
directory & folder where the attachment needs to be
saved.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003>Once they save the file it places the file name
in the field 'attachments' which is a hyperlink field.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003>Now, the problem... (there's always a
catch)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003>How do I make the Save dialog box actually "Save"
the file?! </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003>The Save dialog opens, and places the file name
in the attachments field, but it does not Save the file to the folder
& directory.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=940541715-13032003>Virginia</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> Wortz, Charles
[mailto:CWortz@tea.state.tx.us]<BR><B>Sent:</B> Wednesday, March 12,
2003 1:38 PM<BR><B>To:</B>
accessd@databaseadvisors.com<BR><B>Subject:</B> RE: [AccessD] Adding
Attachments<BR><BR></DIV></FONT>
<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></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>