Selasa, 04 Oktober 2016

Re: [MS_AccessPros] Attachment field question



I put the asterisk there because I noticed that sometimes they scan to a pdf or put a word document. I was thinking I need to account for that.

Jim Wagner

On Tuesday, October 4, 2016 7:41 AM, "John Viescas [MS_Access_Professionals]" <> wrote:


Try this:

Private Sub Command13_Click()
Dim ProjPath As String
ProjPath = "\\Afwfs\AF\Users\jwganer\My Documents\" & [ID] & "*" & Me.PolicyNo.Value"
Shell "C:\WINDOWS\explorer.exe """ & ProjPath & "", vbNormalFocus
End Sub

I am assuming [ID] is a control or field on your form.  Why do you want to stick an asterisk in the middle of it?

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)

On Oct 4, 2016, at 4:28 PM, Jim Wagner [MS_Access_Professionals] <> wrote:

Thank You Crystal. 

So I was thinking about what you said about linking the files elsewhere. So I tried to add the following to a command button in a testing database to be able to open a file based on the id of the record. They planned on scanning the document whatever it is and save it with the name of the record number. But the code is not working. can you help with the syntax. I am getting the error on the  Type Mismatch of the line for ProjPath. I have used this code before to open a folder, so I thought I could add just the file name. 

Thank You 

Private Sub Command13_Click()
Dim ProjPath
ProjPath = "\\Afwfs\AF\Users\jwganer\My Documents\&[ID]*" * " '& Me.PolicyNo.Value"
Shell "C:\WINDOWS\explorer.exe """ & ProjPath & "", vbNormalFocus
End Sub

Jim Wagner

On Monday, October 3, 2016 7:18 PM, "crystal 8 [MS_Access_Professionals]" <> wrote:

Hi Jim,
it depends on how many attachments you have.  And yes, it does make the database bigger.  Another problem with attachments is that often the same file is duplicated in the database (well probably not pictures of employees, but I found only 30% unique files for reference documents in one of the databases I analyzed and took attachments out of) whereas if it was referencing an external file, it would just be another text field with the path and filename.
I generally create a directory below the back-end with all the referenced files so it is easy to move them along with the database and everyone can get the same file even if their paths are different.

~ have an awesome day ~

On 10/3/2016 4:59 PM, [MS_Access_Professionals] wrote:
Hello all,

I was just given a new project on a database that I did not build. There is an attachment field on the form. I am not very familiar with that. I was always told that it bloats databases. Yet when I tested the process, it looked like the opening of the attached files where looking at a location in a folder. 

So the question is, does the attached field bloat the database and make the 2GB limit a quick reach in a very short time?

Thank You

Jim Wagner


Posted by: Jim Wagner <>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.



Tidak ada komentar:

Posting Komentar