Apply the June 2011 cumulative update for Microsoft Access 2010:
http://support.microsoft.com/kb/2544022Important to Note: If you modified the macro containing the TransferText action in Access 2010 before applying the June 2011 cumulative update, you will still receive the error message running the macro after applying the update. If you open your macro in design view, you will see the text specification has changed to the specification index number ('x'). In order to correct the issue, you must reselect the proper text specification name in Access 2010 and save the macro.
Workarounds:This problem can be worked around using one of the methods described below.
Method 1: Create/edit macros in a previous version of Access.
- Open the database in Microsoft Access 2007.
- Select the desired specification name in the TransferText action section of the macro.
- Save and close the macro.
- Open the database in Microsoft Access 2010 and run the macro.
Method 2: Use the TransferText action in Visual Basic for Applications, rather than a macro.
You can perform the same macro action using VBA code. For example:DoCmd.TransferText acImportDelim,"MyImportSpec","Table1","C:\FileName.txt"For more information on using TransferText see the following article:
DoCmd.TransferText Method (Access)
http://msdn.microsoft.com/en-us/library/ff835958.aspxMethod 3: Rename the specification so that it matches its position within the list of specs. To save an existing specification with a new name (essentially renaming the spec) follow these steps:
In the database, start a new text file import by selecting the External Data tab and in the Import & Link group, click Text File.
- Select any text file to import, click ok
- Click Advanced
- Click Specs
- Select the existing specification, click Open
- Click Save As and name it with the corresponding index number (in the list of specs the first is "1", the second is "2", etc.)
- Click Specs
- Select the old specification name and click Delete
- Now the old specification is named with the index number
- Cancel out of the import wizard windows
- Open your macro in design view
- Within the combobox for the specification name, select the new specification name