Topics Search

Macro Export error 3027 (but works manually!)

Macro Export error 3027 (but works manually!)
Views: 103
I have An Access app that has been moved from one domain to another and also converted from 97 to 2003.

A macro runs the TransferText command with the following arguments:
Transfer Type = Export Fixed Width
Specification Name = B123 (spec name does exist)
Table Name = CPB059
File Name = T:\reports\B123.FIL
Has Field Names = No

When it gets to this point execution stops with error 3027
"Cannot update Object or database is read only".

However, no files or folders are read-only, in fact access is full control.
Also, if I manually export a text file from that table it works
Sponsored Links:

Similar posts...


Export TABLE as an XML file

Export TABLE as an XML file Icon
Im trying to create a macro in MS ACCESS 2003 that exports a table to an XML file. It works fine doing the export manually but I get problems doing it by using a macro as the XML export option does not exist as a valid export format in the macro editor. I tried to do it by using send keys and then calling the menue command EXPORT but the sendkeys syntax does not work properly yet. Any suggestions on how to do this?

Error 3027 when importing text file

Error 3027 when importing text file Icon
Got a weird one here.

Up until recently (not exactly sure when) I've been absolutely fine importing text files into Access 97 with the import wizard, where the file extension is .log

Now, every time I do it, I get Error 3027 unable to update as database/object is read only.

if I change the filename to .txt it works, but if I leave it as .log I get that error.

What in the sweet name of Christmas is going on!?!?!?!?!?

trying to export data to a text file

trying to export data to a text file Icon
I am trying to run a simply text dlimited export in Access vba:
My code:

Private Sub Command16_Click()
DoCmd.TransferText acExportDelim, "LBTxt Export Specification", "temp", "C:\Test", True </SPAN>
End Sub </SPAN>

and when I run it I get the following:

I get Run- time error '3027'
cannot update. Database or object is read-only.
I also get this on any table that I try. and I get it if I try maken a macro as well.
Now I should point out that the text file does not exist, but this should create it right?
if I manualy do an export I have no problem.
Neither the database or the table is not set to read only so I do not know.
Actually I cannot tell about the table but I did not set anything

Export a report into excel

Export a report into excel Icon
I have a report that needs to be exported into excel.
I can export it manually, file->export and it exports it fine.

What I want to do is export it when the user clicks on a button. I have created a form with a button "Export".

Private Sub cmdExport_Click()
Dim stDocName As String
stDocName = "rptClientReport"

DoCmd.OutputTo acOutputReport, stDocName, acFormatXLS, "c:\Reports\ClientReport.xls"
End Sub

When I click the "Export" button,
I get error " Run time error: 9.
Subscript out of range"
Why can't I export the report automatically, but I can do it manually. I have already googled the (*^#$(@ out of this error
and still don't have a fix!

Simple Export Not So Simple

Simple Export Not So Simple Icon
I am trying to do a simple export of a table but I keep getting this error message:

Run-time error '3027':
"Cannot update. Database or object is read-only."

Dim varExportSpec As String
Dim varTableName As String
Dim varFileName As String
varExportSpec = "AAtblBankExport Export Specification"
varTableName = "AAtblBankExport"
varFileName = "C:\BankExport\" & varTableName
DoCmd.TransferText acExportDelim, varExportSpec, varTableName, varFileName
MsgBox "Export Successful.", vbOKOnly

Nothing else is open in the DB, just the form that I use to export. I don't have any other files in the folder path I am using

Automate Export to Excel using macro

Automate Export to Excel using macro Icon
Have an issue exporting to excel. I am using MS Access 2007. The query to be exported contains over 130 columns. If I try to make a table out of it, I get a message saying "record is too large". The query runs fine when opened directly. I can also export the query using the excel export button (important - I have to choose the option "Export Data with Formatting and Layout").
But when I try to use the TransferSpreadsheet macro action or command, it pops up the "Enter Paramter Value" window (same occurs if I use the excel export button and do not select the option "Export Data with Formating and Layout"). I tried to check the apprently wrong expressions but the queries work fine and I guess it is related to the fact that the records are too large. My question is, how can I still use a macro to automate the export? I do not want to do the export manually as I have over 30 queries to export to different excel worksheets.

Macro to export to excel and NOT keep formatting?

Macro to export to excel and NOT keep formatting? Icon
I have a query that I need to export to Excel. If I do it through the Export on the menu, I have the option to leave the box "Keep formatting" unchecked.this works perfect. However, I want to create a macro to put on a button (since I don't let the users have the menu) but whenever I run the macro, the file in Excel is formatted. How do I get the macro (or vba code through docmd.outputto) to NOT format the Excel file?

Database Won't Open - Error 3027

Database Won't Open - Error 3027 Icon
I have upgraded to Windows 7 from XP, and as part of that I backed up a 'program' that I have that uses Access to run.

When I put the folder back on my machine now, however, when I try to open the Access file it says Error 3027: Cannot update. Database or object is read only.

If I try to re-run the install procedure, it says that my operating system is not adequate to install.

Here is a link to the program files (external as max file size is 2mb). Does anyone know how I will be able to get this to work on Windows

Macro export to excel error

Macro export to excel error Icon

I have tried to create a macro that would export all the data from one of my tables to excel , but keep running into an error message saying 'Cannot modify table structure. Another user had the table open'.

Of course I checked that nothing was open, even shuttind down the computer and going straight to the macro, but the error message keeps popping up.

Im not sure how much of difference it will mke but im using office 2003, but my database is in 'Access 2000 file format'.

Can anyone point to me a google result that ive missed, or offer some advice

Access 2010 - Open / Close Excel file

Access 2010 - Open / Close Excel file Icon
- I am using MS Access to Export date to an excel file using a macro. The command is ImportExportSpreadsheet and then transfer type is Export.

This works fine, however since this runs daily the size of the excel file increases each time.

If if manually open the excel file and then close it straight away the file size drops from 160 meg to 60meg (as an example).

I was hoping to add another macro command that would just open the excel file and then another to close the file, however I can't seem to find one.