|
-
Oct 6th, 2003, 05:41 AM
#1
Thread Starter
Fanatic Member
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
-
Oct 6th, 2003, 05:58 PM
#2
Fanatic Member
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.
-
Oct 8th, 2003, 03:21 AM
#3
Thread Starter
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|