Results 1 to 3 of 3

Thread: TransferSpreadsheet Error - NOT!

  1. #1

    Thread Starter
    Fanatic Member Mindcrime's Avatar
    Join Date
    Jun 2001
    Location
    Peterborough, UK
    Posts
    555

    Angry TransferSpreadsheet Error - NOT!

    I am having a problem with Access. If I make the filename more than 5 characters I get the error message...
    'Cannot Update. Database or Object is Read Only'

    ... 5 character filenames are a bit limiting these days!!!

    HELP!

    Code:
        DriveLetter = Left(Me.Application.CurrentProject.Path, 3)
        ChDrive DriveLetter
        ChDir DriveLetter & "Content Co-ordination\Price List Database\MailMerge"
    
        DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, "qryMail", "XXXXX.xls"
    Last edited by Mindcrime; Oct 6th, 2003 at 05:44 AM.
    Mindcrime : )
    ICQ 24003332

    VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8

  2. #2
    Fanatic Member WorkHorse's Avatar
    Join Date
    Jul 2002
    Location
    Where you live.
    Posts
    591
    I believe there is (or was)a 64 character limit on the full path name. You are right at 64. I just ran it on Access 2000 and didn't have a problem with longer names, so maybe that limit only applies to Access 97. Anyway, shortening the directory path name should allow longer Excel names, or you can Transfer to the ChDrive then move the xls file to where you want.

  3. #3

    Thread Starter
    Fanatic Member Mindcrime's Avatar
    Join Date
    Jun 2001
    Location
    Peterborough, UK
    Posts
    555

    I hate inheriting code!

    Yeah that seems to make sense. I inherited this code from a part-time programmer, so the rewrite would place the file in the users MyDocuments, as currently the File might get overwritten if another user calls the procedure from their system.

    Thanks
    Mindcrime : )
    ICQ 24003332

    VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width