Results 1 to 6 of 6
  1. #1
    dccjr3927 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    119

    Error 3027 Read-Only Error on Transfertext function

    Good Afternoon:



    I am trying to run a Transfertext, but keep getting a Run-time error '3027': Cannot Update. Database or object is read-only.

    I am not sure if this is a Windows issue or an Access related problem. I can Insert into a table in the same director, but cannot Transfertext. The sub directory that I am trying to output to is empty. When I look at the properties of the subfolder, parent folder, and even the network drive it is Read-only, but I can save to it from from any other program. Here is my Transfertext:

    Code:
    strFileName = "<Path>\<File Name>_" & dteTodayDate
    DoCmd.TransferText acExportDelim, "", "tempExport", strFileName, False, ""
    Is it something that I did, or Windows? I should also note that the tempExport table is a linked table and not a local table (if this makes any difference).

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    8,870
    The first line doesn't make sense. Do you really have files named "<Path>\<File Name>_7-21-2020"?
    If you want the current path, you would use something like
    Code:
    CurrentProject.Path
    or create the path your self:
    Code:
    MyPath = "C:\Projects\Project99A1\" & FileName & "-" & dteTodayDate
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  3. #3
    dccjr3927 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    119
    No, I am not using those. I am using an actual file path and name. I took them out because they have client identifying information in them. My path was copied directly from explorer.

    Was your use of forward slashes instead of backslashes intentional?

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    8,870
    Oops...

    Been looking at web addresses too much.
    (Edited my previous post to fix it.)


    Assuming you have
    Code:
    strFileName = "D:\Clients\JohnSmith\ClientUpdate_" & dteTodayDate
    I would expect an extension before trying to export the data. Something like
    Code:
    strFileName = "D:\Clients\JohnSmith\ClientUpdate_" & dteTodayDate & ".txt"
    So the file name would look like
    Code:
    strFileName = "D:\Clients\JohnSmith\ClientUpdate_7_21_20.txt

    You've checked that the table/query "tempExport" has data? (I know, but had to ask )

    Without seeing your code, this all I've got.
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  5. #5
    dccjr3927 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    119
    Thank you ssnafu! It was indeed the file extension. I guessI assumed that the fuction would add it, given that I select the type. Thanks again for the assistance.

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    8,870
    You are welcome.

    Good luck with your project.
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

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

Similar Threads

  1. Replies: 5
    Last Post: 08-15-2018, 02:52 PM
  2. Replies: 4
    Last Post: 09-08-2016, 12:11 PM
  3. Replies: 2
    Last Post: 12-19-2014, 07:41 AM
  4. Replies: 2
    Last Post: 11-18-2014, 08:56 AM
  5. Runtime Error '3027': Database or object is read only
    By 4x4Masters in forum Programming
    Replies: 4
    Last Post: 06-08-2010, 08:02 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 - Senior Forums