[AccessD] Adding Attachments

Wortz, Charles CWortz at tea.state.tx.us
Wed Mar 12 13:38:00 CST 2003


Virginia,
 
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.
 

Charles Wortz 
Software Development Division 
Texas Education Agency 
1701 N. Congress Ave 
Austin, TX 78701-1494 
512-463-9493 
CWortz at tea.state.tx.us 

-----Original Message-----
From: Hollis,Virginia [mailto:HollisVJ at pgdp.usec.com] 
Sent: Wednesday 2003 Mar 12 13:16
To: 'accessd at databaseadvisors.com'
Subject: RE: [AccessD] Adding Attachments


Is there a way to have the attachment saved (moved?) to a common network
drive, or the directory the database is stored?
 
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.
 
Virginia
 
 

	-----Original Message-----
	From: Arthur Fuller [mailto:artful at rogers.com]
	Sent: Wednesday, March 12, 2003 7:09 AM
	To: accessd at databaseadvisors.com
	Subject: RE: [AccessD] Adding Attachments
	
	

	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).

	 

	-----Original Message-----
	From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com] On Behalf Of Hollis,Virginia
	Sent: March 11, 2003 12:34 PM
	To: 'accessd at databaseadvisors.com'
	Subject: RE: [AccessD] Adding Attachments

	 

	Ok, I found Sub TestGetFileName() in ADH.

	 

	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?

	 

	Virginia

		-----Original Message-----
		From: Arthur Fuller [mailto:artful at rogers.com]
		Sent: Tuesday, March 11, 2003 10:20 AM
		To: accessd at databaseadvisors.com
		Subject: RE: [AccessD] Adding Attachments

		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:

		 

		    With Me

		        .BigImagePath = ahtCommonFileOpenSave()

		    End With

		 

		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.

		 

		(Fuller's Law #3: You start out a Young Turk and before
you know it you're an Old Fart.)

		 

		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:

		 

		    Replace( strExp as String, strFind as String,
strReplace as String )

		 

		HTH,

		A.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030312/b7504551/attachment-0001.html>


More information about the AccessD mailing list