[AccessD] Adding Attachments

Arthur Fuller artful at rogers.com
Wed Mar 12 07:10:00 CST 2003


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.

 

 

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

 

Do you know if there is a way to default the hyperlink to use "relative path
to hyperlink"? 

 

It always wants to use http:\\ for the hyperlink instead of the path. I set
the Base to the directory and folder. I set a field to Hyperlink, I was
hoping that all the customer would have to do is type the name of the
document into the field (Test Attach.doc) and it would open the hyperlink to
the document. Is this correct? What am I missing?

 

************

The archives only show the past 3 months, how do you get to the previous
messages?

 

Virginia

 

-----Original Message-----
From: Wortz, Charles [mailto:CWortz at tea.state.tx.us]
Sent: Tuesday, March 11, 2003 8:23 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Adding Attachments

Virginia,

 

Since you are storing the files externally to Access and only storing a link
(path name) to the files in Access, it makes no difference to Access what
types of files they are.  Linking to external files is a frequent subject on
this list so you should be able to find a lot of hints in the archives.
Some non-obvious search terms that may help are "Image files" and "bloat."

 

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: Tuesday 2003 Mar 11 08:13
To: 'accessd at databaseadvisors.com'
Subject: RE: [AccessD] Adding Attachments

I really do not know what I am after :-) I am open for any ideas because I
sure can't think of any...

 

Make a folder to store the attachments and they would place them in the
directory? Would it matter if they were .pdf or .doc or any type of file?

 

Virginia

-----Original Message-----
From: Wortz, Charles [mailto:CWortz at tea.state.tx.us]
Sent: Tuesday, March 11, 2003 7:59 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Adding Attachments

Virginia,

 

You can have a hyperlink field in a table in which the link to the external
document is placed.  Is this what you are after?

Charles Wortz 

-----Original Message-----
From: Hollis,Virginia [mailto:HollisVJ at pgdp.usec.com] 
Sent: Tuesday 2003 Mar 11 07:51
To: accessd at databaseadvisors.com
Subject: [AccessD] Adding Attachments

Is there a way to add a document as an attachment to a database? 

 

The database is used to request services. The data is entered by a customer
and sometimes the customer needs to add additional documentation to support
their request. The attachment might be a sketch or Word file.

 

Does anyone have any idea how this might be done?

 

Virginia

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


More information about the AccessD mailing list