Importing table from text file to Access...

G

Guest

When importing a text file in order to create a new Access table, the program
displays the following error: "Microsoft Office Access has encountered a
problem and needs to close. We are sorry for the inconvenience."

Could you please advise the best way to import a text file to the Access
2003 tables? I didn't have any problem with the 97 version.
 
J

John Nurick

The ordinary ways of importing data from text files have scarcely
changed since Access 97. Some things that have changed:

- files with non-standard extensions (e.g. .dat instead of .txt cannot
be imported with the default setup.

- text files must have the Windows-standard CR + LF between records
(Access 97 was more forgiving).

But neither of these should cause Access to crash. Do you get the
problem with any text file and any database, or just with one particular
file, or one particular database?
 
G

Guest

Hi John!

Thanks for your answer. I've tried to import different .txt and .csv files
in different databases, without success. Somebody told me that I needed to
get the hotfix En_US 837003, so I contacted Microsoft Support Center and they
gave us the link and password to install the patches. After we installed the
hotfix, Access 2003 still give the same problem, I'm not sure, but... do you
think it is some problem with the wizard? Because same doesn't work
importing any file, but tables from another database.

Could you please write to my hotmail? (e-mail address removed)

Thanks and best regards.
 
J

John Nurick

I'm a little surprised you got the hotfix because the description you
give of your problem does not match the text import problem that the
hotfix addressed, which was the problem with entering field information
into the wizard.

Have you installed Service Pack 1 for Office 2003?

Have you repaired your Office 2003 installation? (go to Control
Panel|Add or Remove Programs, select Office 2003 and then Change).

If neither of those fixes the problem, we need to find out at exactly
what point Access crashes when you try to import a text file. Is it
before the wizard opens? while you're using the wizard? or after you've
finished with the wizard (i.e. during the actual import)?

Can you import or link a CSV file successfully using DoCmd.TransferText?
 
G

Guest

Thanks John. I already installed Service Pack 1 for Office 2003. For some
reason, same is able only for Windows, Word and Excel... but for Access!!

I tried also import the text files by using DoCmd.TransferText, It worked!
but only for the first 5 columns and the text file contains 10 columns.

I'll really appreciate your help with this.

Best regards.

P.D. The problem happens after I setect the file name and click on "Import"
button, and before the wizard displays the "Import Text Wizard" window, where
a sample of the data to be imported appears.
 
J

John Nurick

Thanks John. I already installed Service Pack 1 for Office 2003. For some
reason, same is able only for Windows, Word and Excel... but for Access!!

1) I'm sorry, I can't understand "same is able only for Windows, Word
and Excel... but for Access!!". Please explain precisely what you mean.

2) Did you try repairing your Office 2003 installation as I described in
my last message? If not, please do so.
I tried also import the text files by using DoCmd.TransferText, It worked!
but only for the first 5 columns and the text file contains 10 columns.

Try this:

1) Open the Northwind sample database, display the Database Window, and
export the Employees table to a text file, accepting all the default
settings in the wizard except for specifying "field names in first row".

2) Close Northwind, create a new empty database, and use File|Get
External data to import the text file.

Does this work properly? If so, the problem could be with the text file
you are trying to import, or with the database your are importing it
into? If not, exactly what happened?
 
G

Guest

Hi John!

I did what you kindly advised. But when I tried to export the Employes
table... Jez!... the same message appeared: "Microsoft Office Access has
encountered a problem and needs to close. We are sorry for the
inconvenience."

Do you think it is a problem with the Wizard? I already uninstalled and
re-installed Access but it still doesn't work.
 
J

John Nurick

The fact that you're having problems with Northwind means that there's
most likely something wrong with the installation of Access, Office, the
Jet database engine, or Windows. (I know, that's a big help!)

The next thing I'd try is to re-register the dll files that handle
importing and exporting:
accwiz.dll
msexcl40.dll (Excel)
msxbse40.dll (dBase)
mspdox40.dll (Paradox)
mstext40.dll (Text, CSV, tab-delimited))
In Access 97, the filenames contain 35 instead of 40.

Here's one way of re-registering a DLL file,
1) Locate it (usually all these are in the Windows\System32 or
WINNT\System32 folder.
2) Locate the file regsvr32.exe.
3) Drag the DLL file's icon onto the regsvr32.exe icon.

After that, try exporting from Northwind again. If Access still crashes
at that point, the choices (I feel) are as follows. (By the way, when
Access gives you the message about "encountered a problem and needs to
close", have you been allowing it to send diagnostic information to
Microsoft? If not, please do so: it may produce an automated response
with a cure for the problem):

1) Raise a support incident with Microsoft (mentioning that the hotfix
didn't solve your problem).

2) Search the knowledgebase at http://support.microsoft.com for
instructions for fully uninstalling Office 2003. Follow these, and then
re-install Office 2003, the Service Pack, and any subsequent updates.
 
G

Guest

I'm using Access 2000 SP3 and I'm trying to link tables such as a Excel
(2000) or text files, Access hangs up waiting for something. Access is still
functional but in the bottom screen theer is a message "Link Spreadsheet
Wizard". Closing access can be probabmatic at this stage.

When re-installing Access, this works again but then breaks after creating a
new link. What is the problem that seems to break Accesss ? Is there a
workaround ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top