Results 1 to 4 of 4
  1. #1
    ksmith21 is offline Novice
    Windows XP Access 2013
    Join Date
    Jan 2016
    Posts
    2

    How to find the path of a report in your database

    I have developed a form to send an email from my Access database using VBA. I would like to add an attachment as a default. I would like this to be a report within the database. I have a code that will browse to an external file and then attach and send but I just want to add a local file.
    How do I find the path of the report in the database?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    What do you mean by 'path of the report'? An Access report is an object in the database, there is no 'path'. Reports are dynamic. The data displayed in a report changes as data is input to the database. A report must be open for the data to be viewed. Reports can be exported to other formats such as xls and pdf. A report open in PrintPreview can be directly included as pdf attachment to an email with SendObject method. Other code methods require report to first be exported to xls or pdf and then that file can be attached to email.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ksmith21 is offline Novice
    Windows XP Access 2013
    Join Date
    Jan 2016
    Posts
    2
    Thankyou for the response. When you use the wizard to insert a hyperlink and you can point straight to a report - that was what I was hoping would be a "path" which I could just insert into a default attachment box. I understand what you are saying though and will now try and work out the code for what you have suggested (I cannot use SendObject - the computer settings and firewalls in place block everything so I have had to vba code (which works).

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    By 'insert a hyperlink' you mean into a Hyperlink type field?

    What do you mean by 'attachment box' - an Attachment type field would embed the file into record, this would not be a 'hyperlink' to external file. Including a file from Attachment field requires first saving the embedded file out to external folder location.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 2
    Last Post: 01-13-2015, 07:16 AM
  2. How Can I Find The Path To A Tab Control Page?
    By nono5551212 in forum Programming
    Replies: 2
    Last Post: 07-30-2014, 09:01 AM
  3. Replies: 2
    Last Post: 05-25-2012, 07:36 AM
  4. Find UNC path
    By jordanturner in forum Access
    Replies: 2
    Last Post: 09-17-2010, 09:18 AM
  5. How get path of executing database?
    By mscertified in forum Forms
    Replies: 3
    Last Post: 11-09-2005, 03:56 PM

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