Macro Export error 3027 (but works manually!)

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:

Related Topics

Export TABLE as an XML file
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
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
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
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
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

Macro to export to excel and NOT keep formatting?
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?

Macro to Export to Excel
I have a macro that exports (transfer spreadsheet) queries into excel. But since I have put a password to modify the data in excel, the macro can't export the data into excel.

Is there a way around this? The error message I get when trying to run the macro is "Cannot Update, Datebase or object is read only

Database Won't Open - Error 3027
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

Export to Excel
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. thx

Macro export to excel error

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
- 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.

DoCmd.TransferText acExportFixed
I am trying to use the DoCmd.TransferText acExportFixed command to create a text file. but everytime I run the code I get the error Run-time error '2511':
The action or method requires a Specification Name argument.

I have created the Spec file by doing the export clicking on the advanced tab creating my field sizes and saving the spec file (ClaimsExportSpecs). If I run the export manually everything works fine.

I've also tried the Schema.ini file and put it in the same directory I'm putting my export file. The Schema.ini gives me a Run-time error '424': Object Required error.

My code is:
DoCmd.TransferText acExportFixed, ClaimsExportSpecs, "qryExport", "C:\Export Test\ExportTest.txt"

and/or (trying both ways)

DoCmd.TransferText acExportFixed, Schema.ini, "qryExport", "C:\Export Test\ExportTest.txt"

doing an acExportDelim works fine but I need it in fixed format

Module and Macro
I have created a Module which is used to amend the data type of a table from a number to Text 30.

This is the code used.

Public Sub ChangeDataType()

Dim dbase As DAO.Database

Set dbase = CurrentDb

dbase.Execute ("ALTER TABLE [FM 1 Cref Make] ALTER COLUMN [CALL_IN_REF] text(30);")

End Sub

This module works perfectly fine when run manually but when it is in a Macro
as a RunCode the following error message appears when the Macro is run.


The expression you entered has a function name that MS Office Access can't find

Even though in the macro the name of the ChangeDataType()

Import a file with no extension
I am trying to write a macro that will import a file. The file is created from a mainframe export and the file does not have a file extension. I am using Access 2007 and it will not let me import from a file that does not have one of the standard extensions and gives an error of such when I try. I am trying to create a process that does not require manually having to change the file in any way prior to importing into my Access table. Is there a work-around that will allow me to import this file on a monthly basis without having to manually add a file extension to the file first

Executing code from within a macro?
I'm not very good with macros, as you can probably guess. My import macro works fine, but I can't get it to run a VB sub very well. I tried an "Open Module" action in the macro, but it pops up the VB window so I can run the sub procedure manually. It works, but it's not too impressive to show the boss.

It seems to work if I turn the sub into a function in VB and specify run code in the macro action. Is this OK to do

Export To From Access 03 to Excel using VBA
I have a database with many staff members and each staff member has many Customers assigned to them. I want to export customer details to a separate excel file for each staff member. I don't want to have to do this manually as its going to take up time. I'd like to name the files according to the staff number also if possible.

I don't know how I can do this in Access. Do I write a module or a macro or something. I wrote a macro previous for something similar where I created 50 individual queries for each member of staff and used the TransferSpreadsheet function in a macro but this was too laborious.

I found this in the code repository but it's not quiet what im looking for

Select Method of Range class failed - error
I have a macro that runs four modules to export four different queries to an Excel spreadsheet, 3 queries to one tab and 1 query to another tab.

They all export ok but I get this error and I am not sure why.

Use Macro to export table to csv
I have a table with 5 fields in it, all text. When I export it manually the output is fine:
Accountid ApplicationN FirstName LastName Name
sm891 dev.racf 259

When I use a macro the second field is filled some type of numbers:
Accountid ApplicationN FirstName LastName Name
sm891 64 00 65 00 76 00 2E 00 72 00 61 00 63 00 66 00 259

Exporting Table via macro W/Out Format
need a little help here. I'm trying to create a macro that will run a series of queries and export the table it generates without formatting the text file. right now the export keeps the rows and columns with borders around the text and headers. what I need is data to be delimited with the text running without borders and field headers. Is this possible to run as a macro? I can do this via a TXT export and not selecting the export option of formatting and layout, then assign my delimiters and adjust the columns. Is there any way to automate this with a macro

Access export excel file with macro help
I am currently working on a project that involves running a macro off access to export an excel file with the appropriate queries. So far I have been successful in doing that. The next step is where I am stuck, well a couple of things.

1. Is there a way to automatically open your exported excel file after running your macro off access?

2. After the export is complete all of the data is arranged how I want on 2 worksheets. However, I need a way to enable a macro to automatically format the information (which I have created, but don't know how/where to save it appropriately).

But the thing is, since the database is being constantly updated, and I need to export information from that database several times a day, and the formatting macro needs to be applied everytime I export this file (which isn't a problem if I was the only user).

Also, other people are exporting the same information but without the formatting because they don't have the right formatting macro that I have created.

Is there a way to integrate the formatting macro I have created to this specific file forevery user that tries to export this same file?