Results 1 to 6 of 6
  1. #1
    markschultze is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    3

    Attachment field use in Access on a remote desktop hosted database question.

    We have an Access Database being hosted by a company as a remote desktop application. We are configured for full Microsoft Office Suite Access 2010. Within the database we have a simple attachment field where we link a few .pdf and Word or Excel Documents. On our local machine, clicking on the attachment window opens the attachment dialog box, which lists the files in the attachment field.

    In the local mode, PDF, Word and Excel files open just find, but on the remote desktop, if I highlight a pdf file and click open, in launches the Adobe Reader and I can view the attachment. If I highlight and click open on a Word Doc, it launches Word, but I get an error message.

    I have included a file showing the normal attachment dialog and the error message when trying to open a Word Document from within Access on the remote desktop. Also there is a file for the error message I get when trying to launch an Excel file. I am able to launch the files from within Windows Explorer by clicking on them.

    Thanks,


    Mark
    Attached Files Attached Files

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You're mixing your terminology, in the first paragraph you state:

    ....have a simple attachment field where we link a few .pdf and Word or Excel Documents....
    but in your attachment you state:

    ....trying to open a Word Document which is an attachment within Access...
    There are two different ways of addressing attachments in Access
    1. Put in the path and file name in a text fields, when you want to view the file you open the file that corresponds to that text path
    2. Actually store the original document in your database (OLE objects) which is much costly in terms of database storage

    You are hinting that you're doing it both of these ways which I don't think you are.

    So the question is, are you actually storing the document within access (OLE OBJECT)? or are you storing a string (TEXT FIELD) to the location of the file?

  3. #3
    markschultze is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    3
    So the question is, are you actually storing the document within access (OLE OBJECT)? or are you storing a string (TEXT FIELD) to the location of the file?[/QUOTE]

    I believe we are actually storing the document (OLE OBJECT) as the database grows rapidly in size when a file is put in the attachment field.

    We would prefer to just store a link, but non of the volunteers doing this knows how. I'm guessing that a simple link would also solve the problem of configuring the host to open an OLE OBJECT, besides keeping the database to a much smaller size.

    Is there a tutorial or directions buried in the documentation or on the Microsoft site showing how to do that? When you search the online help for attachments, it comes up with the attachment field and directions. What is the text field method called?

    Thanks,

    Mark

  4. #4
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    A remote hosted App cannot link/open a locally stored attachment. The attachment must be stored at the remote host location.

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    NTC is correct, if you have attachments for your database and you want to store the items as links the files would have to be available in both locations (that could be handled simply just by copying the file from your 'local' network to the 'remote' network.

    you could do something like:

    Code:
    Public Function OpenWordPad(strFile As String)
         Dim x As Variant
        x = Shell("write.exe " & strFile, 1)
    End Function
    Public Function OpenNotePad(strFile As String)
         Dim x As Variant
        x = Shell("notepad.exe " & strFile, 1)
    End Function
    Public Function OpenWord(strFile As String)
         Dim x As Variant
        x = Shell("WINWORD.exe " & strFile, 1)
    End Function
    Public Function OpenExcel(strFile As String)
         Dim x As Variant
        x = Shell("EXCEL.exe " & strFile, 1)
    End Function
    Private Sub List0_DblClick(Cancel As Integer)
    
    Dim spath As String
    Dim sfile As String
    
    spath = CurrentProject.Path
    sfile = spath & "\files\" & List0.Column(3)
    
    If Right(sfile, 4) = ".doc" Or Right(sfile, 4) = "docx" Then
        OpenWord (sfile)
    ElseIf Right(sfile, 4) = ".xls" Or Right(sfile, 4) = "xlsx" Then
        OpenExcel (sfile)
    Else
        '.... other file types
    End If
    
    End Sub
    in my sample database I've got a folder in the same folder as the database and I'm just dumping all the relevant files in there and this code works.

    for the pdf's you've got to find where the program is installed on the 'remote' computer and create a function for that specific item

  6. #6
    markschultze is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    3
    The files are located on the remote server. I'll pass this code on to the volunteer setting this up. Hopefully she can figure it out.

    Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using Access on a Mac through Remote Desktop
    By philsonghurst in forum Misc
    Replies: 3
    Last Post: 06-24-2012, 11:10 AM
  2. Replies: 2
    Last Post: 03-30-2012, 02:37 AM
  3. Replies: 2
    Last Post: 09-01-2011, 01:23 PM
  4. Remote Desktop Database Needs Help
    By DianeG in forum Database Design
    Replies: 4
    Last Post: 04-05-2011, 04:25 PM
  5. Access and Remote Desktop
    By pedsys in forum Access
    Replies: 1
    Last Post: 10-08-2010, 10:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums