none
Where does Access store its temporary files?

    Question

  • Access 2010 . mdb-file - Win2008R2 terminal server: for some users running this Access application it is not possible to send email with attachments (fails with SendObject was cancelled) or run/view reports (OpenReport was cancelled). (for other users this work).

    Looks like access fails to generate the (temporary) file used for the report or attachement, that is, a rights problem.

    What else (if any) could cause this?

    Where does Access store its temporary files?

     

    Thanks for any help!


    Developer
    Thursday, September 22, 2011 11:00 AM

Answers

  • Hi Nathan O.

    Thanks for answering.

    The problem we experienced has gone away by itself! Now both Send with attachment and run report works.

    The error messages we received was "SendObject was cancelled" and "OpenReport was cancelled". The Err.Number was 2501 if I remember correctly.

    I tried manually to create a file and edit it in %TEMP% ( %TMP% was equal to %TEMP%) without any problems. Only Access had problems creating a document. I haven't tried with Word because the problem went away before I could try. The default mail client is Outlook and mail profiles exist. There were no problems using Outlook.

    I am quite sure the problem was connected to access rights to the %TEMP% folder. This is differently handled on a terminal server than on a workstation.

    On  a terminal server the TEMP points to a folder like this: C:\Users\<user name>\AppData\Local\Temp\<number> ( f.ex.: C:\ ... \Temp\39 ).

    I think the <number> part may change - probably if the same user logs on more than once (unsure of the rules here).

    My theory is that the problem users had cached rights settings, and that this cache now has timed out and the rights have been refreshed causing the problem to go away (just my theory).

    I am unable to examine this problem any further now that it has gone away.

    Thanks for your effort trying to help!

     


    Developer
    • Edited by kegerdal Thursday, September 29, 2011 2:32 PM
    • Proposed as answer by Bruce Song Thursday, October 06, 2011 8:38 AM
    • Marked as answer by kegerdal Thursday, October 06, 2011 9:09 AM
    Thursday, September 29, 2011 2:31 PM

All replies

  • Hi Kegerdal,

    I do not think this could be cause of the tempoary files. I tried the statement on my side:

    Private Sub Command2_Click()
    DoCmd.SendObject acSendTable, "StudentInfo", acFormatPDF, "BruceSong", , , "send object pdf"
    End Sub
    After generating the email send message box, I try to search the StudentInfo.pdf, but I can't find it. As for the problem, please take a  look at this thread to see whether it can help you:

    SendObject Method Doesn't Work in MS Access 2010

    http://social.msdn.microsoft.com/Forums/en-US/accessdev/thread/7e3c643f-d7c2-4285-a11e-fbf72b15317f/

    Just feel free to follow up after you have tried.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    • Edited by Bruce Song Monday, September 26, 2011 2:33 AM
    Monday, September 26, 2011 2:33 AM
  • Hi and thanks for your answer.

    I disagree with you: this has all to do with Access not being allowed to create a temporary file.

    SendObject works OK if I use it without any object:

    DoCmd.SendObject acSendNoObject, , acFormatPDF, "no@where.com", , , "Subject", "Message"

    It fails when using it with an object so Access will have to make a temporary file to send.

    Also it fails when running a report causing Access to generate a temporary file for the report to show.

     

    This works for most users - only some users have this problem, and I know the problem will go away if the user profile for the users in question are cleared and recreated.

    This will be a nuisance for the actual users, so I would prefer to fix the problem without recreating the user profiles.

    So, my question still is: Where does Access store its temporary files? (this is on a terminal server Windows 2008 R2)

    (and what can be done to solve the problem if the solution is not obvious).

     

     


    Developer
    Monday, September 26, 2011 10:38 AM
  • Hi Kegerdal,


    A few questions I have are as follows:

     

    +>For these specific users, are you able to use the SendObject command from other Office applications.  As a test, please open Word and create a simple sample document and save it.  Then with that Word document open, click on the File menu and chose Save & Send -> and then click Save As Attachment.  Does this work or do you receive an error?  If you receive an error, what is the exact error message you are receiving.

    +>What is the default mail client on these machines?

    +>You also mentioned you are receiving an error when you try and view a report.  What is this exact error message and what steps are you using to generate this error?

    +>Do the problematic users have a default printer setup for them?  What happens if you switch to a different default printer?

    +>I ran a process monitor log while going through the SendObject steps on my end and it appears Access is using a temp folder similar to the one below to create its temp file in (this may be slightly different on a terminal server).  You could ensure the specific user has the proper permission to this temp folder and / or take a process monitor log on the machine when testing this with a problematic user.  In the log, I would filter for only the Access process and see if you receive any Access Denied messages in the log file for the problematic user.

     

    C:\Users\<user name here>\AppData\Local\Temp\msoAF23.tmp

     

     

    Best Regards,

    Nathan O.

    Microsoft Online Community Support

     


    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Proposed as answer by Bruce Song Thursday, October 06, 2011 8:38 AM
    Tuesday, September 27, 2011 5:13 PM
    Moderator
  • Hi Nathan O.

    Thanks for answering.

    The problem we experienced has gone away by itself! Now both Send with attachment and run report works.

    The error messages we received was "SendObject was cancelled" and "OpenReport was cancelled". The Err.Number was 2501 if I remember correctly.

    I tried manually to create a file and edit it in %TEMP% ( %TMP% was equal to %TEMP%) without any problems. Only Access had problems creating a document. I haven't tried with Word because the problem went away before I could try. The default mail client is Outlook and mail profiles exist. There were no problems using Outlook.

    I am quite sure the problem was connected to access rights to the %TEMP% folder. This is differently handled on a terminal server than on a workstation.

    On  a terminal server the TEMP points to a folder like this: C:\Users\<user name>\AppData\Local\Temp\<number> ( f.ex.: C:\ ... \Temp\39 ).

    I think the <number> part may change - probably if the same user logs on more than once (unsure of the rules here).

    My theory is that the problem users had cached rights settings, and that this cache now has timed out and the rights have been refreshed causing the problem to go away (just my theory).

    I am unable to examine this problem any further now that it has gone away.

    Thanks for your effort trying to help!

     


    Developer
    • Edited by kegerdal Thursday, September 29, 2011 2:32 PM
    • Proposed as answer by Bruce Song Thursday, October 06, 2011 8:38 AM
    • Marked as answer by kegerdal Thursday, October 06, 2011 9:09 AM
    Thursday, September 29, 2011 2:31 PM