0% found this document useful (0 votes)
76 views29 pages

Troubleshooting MS-Access Error 31532 - Unable To Export Data

The document describes troubleshooting steps taken to resolve an MS Access error 31532 that occurred when trying to export data from a query. The error was eventually traced to a record that had invalid data in a field being used in the query's criteria. The query and custom VBA functions were updated with validation checks to handle unexpected data values and prevent future errors. Additional filters were also added to the query to improve performance and avoid including problematic records.

Uploaded by

tetkaC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views29 pages

Troubleshooting MS-Access Error 31532 - Unable To Export Data

The document describes troubleshooting steps taken to resolve an MS Access error 31532 that occurred when trying to export data from a query. The error was eventually traced to a record that had invalid data in a field being used in the query's criteria. The query and custom VBA functions were updated with validation checks to handle unexpected data values and prevent future errors. Additional filters were also added to the query to improve performance and avoid including problematic records.

Uploaded by

tetkaC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 29

https://www.comeausoftware.

com/2019/09/ms-access-error-31532-unable-to-export-data/

Troubleshooting MS-Access Error 31532 –


Unable to export data.

Microsoft Access can sometimes seem to have its own obstinate personality, throwing errors that
persist no matter what you try. I wanted to share a recent troubleshooting experience to show some
of the steps that you can take when a function is just not working as expected and the decision
process involved in fixing it.

The Problem
The other day, I received a bug report from one of my clients over e-mail. They were trying to run a
report I’d designed for them awhile back and getting a rather vague error.

At least the VBA error handler worked as designed; it passed along the error number and
description that VBA coughed up and allowed the user to exit from the screen and continue using
the program. It wouldn’t hurt if I had included the name of the subroutine for my own convenience
but this client is good about providing information on where they found it. In this case, it was a form
that enables them to preview the results of a query and then export it to Excel.

The Process
Investigating the procedure behind the form, I found the DoCmd.TransferSpreadsheet command
where it was failing and the query it was trying to export. Running the query, I got another error when
trying to preview the data instead of exporting it:

/conversion/tmp/activity_task_scratch/552588391.doc
129
The “too complex to be evaluated” error in an Access query is a bit like the Check Engine light in
your car. It’s not going to tell you what’s wrong but there’s definitely something Access SQL doesn’t
like and it won’t cooperate until you figure it out.

The next step was to look at the elements in the query to see what might have been causing the
problem. Removing all but a couple of basic fields enabled the query to run and this meant that at
least the query itself with its multiple table joins was working.

I finally narrowed it down to this field:

This client uses a shipment reference number that combines a date code with a sequence number (-
1, -2, -3, etc..). On the first line above, the query is using Left() and InStr() to strip off the dash and
sequence number so it can search the records just by the date code. The criteria line at the bottom
shows that the resulting value is being matched against a value selected from a combo box on the
form. In this way, the client can pull all the records for that date code.

Obviously, there was something in that combination of functions and criteria that was giving Access
indigestion but I needed it to work. I was also a little puzzled why it was failing now since I know I
tested it before releasing the changes to them.

/conversion/tmp/activity_task_scratch/552588391.doc
229
Since Access wasn’t providing any more information, my next step was to break the Left() function
down into a custom VBA function of my own and use that in the query instead. In retrospect, I
should have first looked more closely at the values that the Left() function was producing through the
query but there are a lot of things that seem obvious after they slap us in the face.

Public Function GetDateCodeFromShipment(ShipmentID As String) As String

'Get the position of the dash in the NonReturnID.

intDash = InStr([ShipmentID], "-") - 1

'Return the relevant portion.

GetDateCodeFromShipment = Left([ShipmentID], intDash)

...

I could then use this function in the query and it would return the date code needed to compare
against the one selected on the form.

… and it failed!!

The Cause
The routine was failing in the Left() function from last line of the code above That’s when I decided
to look at the values that the InStr() function was returning and, sure enough, I found that on
one record, it was returning a value of -1 which the Left() function didn’t like.

This was because, for the first time in tens of thousands of records, the client had accidentally
entered a ShipmentID without the dash and sequence number. InStr() returned a 0 since it found no
dash and then Left() tried to select -1 characters from the ShipmentID, resulting in the illegal function
call. Since the entire function had been previously contained within the query, there was no error
handling to explain the message until I broke it out into my own function.

I also found that the query needed to be filtered on another field that would further limit the records
returned. With the extra filter, the bad data didn’t even affect it and it ran faster.

/conversion/tmp/activity_task_scratch/552588391.doc
329
The Solution
The extra query filter was the first step. Since I’d already written the new function, I decided to leave
it in place and added a couple lines to handle values that did not include the dash.

'Get the position of the dash in the ShipmentID.

intDash = InStr([ShipmentID], "-") - 1

'Return the relevant portion.

If intDash > 0 Then

GetDateCodeFromShipment = Left([ShipmentID], intDash)

Else

'No dash, return the whole thing.

GetDateCodeFromShipment = ShipmentID

End If

Then, I actually made this moot as I decided to try to prevent further data entry errors on the form
where the data had originally come from.

Private Sub ShipmentID_BeforeUpdate(Cancel As Integer)

...

'Verify there's a sequence number at the end.

If InStr(Me.ShipmentID, "-") = 0 Then

MsgBox "Shipment codes should end with a dash followed by a sequence number. (-1,

-2, -3, etc..). Please correct this if possible.", _

vbOKOnly, "Missing sequence number ..."

End If

...

The BeforeUpdate event on a form field can be used to run checks on the data and to cancel the
update if necessary. On the event declaration above, you will notice the Cancel argument. Setting
this argument to True (even though it’s an integer) will cancel the update and keep the focus on that
field until the user corrects the problem. In this case, I decided just to show a warning and not restrict
the client’s data entry any more than absolutely necessary.

/conversion/tmp/activity_task_scratch/552588391.doc
429
https://www.errorvault.com/en/troubleshooting/runtime-errors/microsoft/microsoft-access/error-
31532_microsoft-office-access-was-unable-to-export-the-data

How to fix the Runtime Error 31532 Microsoft


Office Access was unable to export the data
This article features error number Code 31532, commonly known as Microsoft Office Access was unable
to export the data described as Microsoft Office Access was unable to export the data.@@@1@@@1.

Error Information
Error name: Microsoft Office Access was unable to export the data
Error number: Error 31532
Description: Microsoft Office Access was unable to export the data.@@@1@@@1.
Software: Microsoft Access
Developer: Microsoft

Try this first: Click here to fix Microsoft Access errors and optimize system performance

This repair tool can fix common computer errors like BSODs, system freezes and crashes. It can
replace missing operating system files and DLLs, remove malware and fix the damage caused by
it, as well as optimize your PC for maximum performance.

DOWNLOAD NOW

About Runtime Error 31532


Runtime Error 31532 happens when Microsoft Access fails or crashes whilst it’s running, hence
its name. It doesn’t necessarily mean that the code was corrupt in some way, but just that it did
not work during its run-time. This kind of error will appear as an annoying notification on your
screen unless handled and corrected. Here are symptoms, causes and ways to troubleshoot the
problem.

Definitions (Beta)
Here we list some definitions for the words contained in your error, in an attempt to help you
understand your problem. This is a work in progress, so sometimes we might define the word
incorrectly, so feel free to skip this section!

 Access - DO NOT USE this tag for Microsoft Access, use [ms-access] instead
 Export - "Export" refers to the automated or semi-automated conversion of data sets from one
data format to another

/conversion/tmp/activity_task_scratch/552588391.doc
529
 Access - Microsoft Access, also known as Microsoft Office Access, is a database management
system from Microsoft that commonly combines the relational Microsoft JetACE Database
Engine with a graphical user interface and software-development tools
 Microsoft office - Microsoft Office is a proprietary collection of desktop applications intended to
be used by knowledge workers for Windows and Macintosh computers

Symptoms of Code 31532 - Microsoft Office Access was unable to export the data
Runtime errors happen without warning. The error message can come up the screen anytime
Microsoft Access is run. In fact, the error message or some other dialogue box can come up
again and again if not addressed early on.

There may be instances of files deletion or new files appearing. Though this symptom is largely
due to virus infection, it can be attributed as a symptom for runtime error, as virus infection is
one of the causes for runtime error. User may also experience a sudden drop in internet
connection speed, yet again, this is not always the case.

(For illustrative purposes only)

Causes of Microsoft Office Access was unable to export the data - Error 31532
During software design, programmers code anticipating the occurrence of errors. However, there
are no perfect designs, as errors can be expected even with the best program design. Glitches can
happen during runtime if a certain error is not experienced and addressed during design and
testing.

Runtime errors are generally caused by incompatible programs running at the same time. It may
also occur because of memory problem, a bad graphics driver or virus infection. Whatever the
case may be, the problem must be resolved immediately to avoid further problems. Here are
ways to remedy the error.

/conversion/tmp/activity_task_scratch/552588391.doc
629
Repair Methods
Runtime errors may be annoying and persistent, but it is not totally hopeless, repairs are
available. Here are ways to do it.

If a repair method works for you, please click the upvote button to the left of the answer,
this will let other users know which repair method is currently working the best.

Please note: Neither ErrorVault.com nor it's writers claim responsibility for the results of the
actions taken from employing any of the repair methods listed on this page - you complete these
steps at your own risk.

Method 1 - Close Conflicting Programs

0
up vote down vote

When you get a runtime error, keep in mind that it is happening due to programs that are
conflicting with each other. The first thing you can do to resolve the problem is to stop these
conflicting programs.
 Open Task Manager by clicking Ctrl-Alt-Del at the same time. This will let you see the list
of programs currently running.
 Go to the Processes tab and stop the programs one by one by highlighting each
program and clicking the End Process buttom.
 You will need to observe if the error message will reoccur each time you stop a process.
 Once you get to identify which program is causing the error, you may go ahead with the
next troubleshooting step, reinstalling the application.

Method 2 - Update / Reinstall Conflicting Programs

0
up vote down vote

Using Control Panel


 For Windows 7, click the Start Button, then click Control panel, then Uninstall a program
 For Windows 8, click the Start Button, then scroll down and click More Settings, then
click Control panel > Uninstall a program.
 For Windows 10, just type Control Panel on the search box and click the result, then click
Uninstall a program
 Once inside Programs and Features, click the problem program and click Update or
Uninstall.
 If you chose to update, then you will just need to follow the prompt to complete the
process, however if you chose to Uninstall, you will follow the prompt to uninstall and
then re-download or use the application's installation disk to reinstall the program.

/conversion/tmp/activity_task_scratch/552588391.doc
729
Using Other Methods
 For Windows 7, you may find the list of all installed programs when you click Start and
scroll your mouse over the list that appear on the tab. You may see on that list utility for
uninstalling the program. You may go ahead and uninstall using utilities available in this
tab.
 For Windows 10, you may click Start, then Settings, then choose Apps.
 Scroll down to see the list of Apps and features installed in your computer.
 Click the Program which is causing the runtime error, then you may choose to uninstall
or click Advanced options to reset the application.

Method 3 - Update your Virus protection program or download and install the
latest Windows Update

0
up vote down vote

Virus infection causing runtime error on your computer must immediately be prevented,
quarantined or deleted. Make sure you update your virus program and run a thorough scan of
the computer or, run Windows update so you can get the latest virus definition and fix.

Method 4 - Re-install Runtime Libraries

0
up vote down vote

You might be getting the error because of an update, like the MS Visual C++ package which
might not be installed properly or completely. What you can do then is to uninstall the current
package and install a fresh copy.
 Uninstall the package by going to Programs and Features, find and highlight the
Microsoft Visual C++ Redistributable Package.
 Click Uninstall on top of the list, and when it is done, reboot your computer.
 Download the latest redistributable package from Microsoft then install it.

Method 5 - Run Disk Cleanup

0
up vote down vote

You might also be experiencing runtime error because of a very low free space on your
computer.
 You should consider backing up your files and freeing up space on your hard drive
 You can also clear your cache and reboot your computer
 You can also run Disk Cleanup, open your explorer window and right click your main
directory (this is usually C: )
 Click Properties and then click Disk Cleanup

/conversion/tmp/activity_task_scratch/552588391.doc
829
Method 6 - Reinstall Your Graphics Driver

0
up vote down vote

If the error is related to a bad graphics driver, then you may do the following:
 Open your Device Manager, locate the graphics driver
 Right click the video card driver then click uninstall, then restart your computer

Method 7 - IE related Runtime Error

0
up vote down vote

If the error you are getting is related to the Internet Explorer, you may do the following:
1. Reset your browser.
a. For Windows 7, you may click Start, go to Control Panel, then click Internet
Options on the left side. Then you can click Advanced tab then click the Reset
button.
b. For Windows 8 and 10, you may click search and type Internet Options, then go
to Advanced tab and click Reset.
2. Disable script debugging and error notifications.

o On the same Internet Options window, you may go to Advanced tab and look for
Disable script debugging
o Put a check mark on the radio button
o At the same time, uncheck the "Display a Notification about every Script Error"
item and then click Apply and OK, then reboot your computer.

If these quick fixes do not work, you can always backup files and run repair reinstall on your
computer. However, you can do that later when the solutions listed here did not do the job.

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/33e10d4f-aa65-4981-8b96-
9c5abb95e92c/31532-microsoft-access-was-unable-to-export-the-data?forum=accessdev

31532 Microsoft Access was unable to export the data 


Microsoft Office for Developers
 > 
Access for Developers
 Question

/conversion/tmp/activity_task_scratch/552588391.doc
929
Sign in to vote
I just recently upgraded to Access 2016.

I have been exporting a query to Excel with no problem using the following statement:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryName", "file.xls", True

After upgrade I'm getting the error in my title.

Any ideas?

Thanks for your help!!


Saturday, April 29, 2017 7:15 PM
Reply
|
Quote

plynton
Independent
0 Points

All replies

0
Sign in to vote
Will work if you remove the constant acSpreadsheetTypeExcel9.
Sunday, April 30, 2017 9:51 AM
Reply
|
Quote

aushknotes
30 Points
 

0
Sign in to vote
Hi plynton,

/conversion/tmp/activity_task_scratch/552588391.doc
1029
I find that this error occurs due to corruption.

it is possible that when you had install the Access 2016.

at that time installation not done successfully or correctly.

and cause this issue.

try to repair the MS Office or try to reinstall it.

try to run the same line of code and check whether your issue is solved or not.

for further reference you can visit link below.

How To Fix Microsoft Access Error 31532


DoCmd.TransferSpreadsheet Method (Access)
let me know about your testing results, so that I can try to provide further suggestions if needed.

Regards

Deepak

MSDN Community Support


Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as
Answer" if not. This can be beneficial to other community members reading this thread. If you have any
compliments or complaints to MSDN Support, feel free to contact [email protected].

/conversion/tmp/activity_task_scratch/552588391.doc
1129
http://www.utteraccess.com/forum/Error-31532-MS-Access-u-t1722563.html
 Oct 1 2008, 02:05 PM
frerbe Post#1

Hello,
I've been using (and still do) MSAccess for a lot of the websites I've developed. One of the
Posts: 3 features I've always liked is the Reports within Access. I've developed a method using the
Joined: 1-October 08 ExportXML call to export the report (.xsl / .xml / .asp files) from access and then use them
online using realtime data pulled from the database. This works great and still does. The
problem I am seeing now since I've moved up to Vista is that when I call the ExportXML
method, I get the following Error.

Run-time error '31532':


Microsoft Office Access was unble to export the data.
The code itself still works fine on an XP machine...just not sure what permissions or what
might be going on in Vista. Any insight would be greatly appreciated. <
The code I am running is as follows (this is it...nothing more...pretty basic. < )

Dim sRpt As String, sXML As String, sXSL As String


sRpt = Form_CreateReport.Text1.Value ' name of report entered by user
sXML = "C:rpt001.xml" ' xml data of report
sXSL = "C:" & Form_CreateReport.Text1.Value & ".xsl" ' xsl of the report
iFrmt = 4
ExportXML acExportReport, sRpt, sXML, , sXSL, , ,iFrmt

 Oct 1 2008, 02:19 PM


HiTechCoach

Welcome to UtterAccess!
It generally is not a good idea to write to the root directory of the system drive.
I would urge you to create a folder in the user's profile to write into.
CODE
Environ("userprofile")
UtterAccess VIP
Posts: 19,037
Joined: 29-September 03
For example you could use:
From: Oklahoma City, CODE
Oklahoma Dim sRpt As String, sXML As String, sXSL As String
sRpt = Form_CreateReport.Text1.Value ' name of report entered by user
sXML =  Environ("userprofile") & "\my documents\rpt001.xml" ' xml data of report
sXSL =  Environ("userprofile") & "\my documents\" & Form_CreateReport.Text1.Value
& ".xsl" ' xsl of the report
iFrmt = 4
ExportXML acExportReport, sRpt, sXML, , sXSL, , ,iFrmt

/conversion/tmp/activity_task_scratch/552588391.doc
1229
 Oct 1 2008, 02:35 PM
frerbe

Thanks for the quick reply! 


Unfortunately the same error persists. Is this a method that is blocked in Vista?
Posts: 3 or...do I need to open the file with some special permissions? I've opened it exclusively, nothing..
Joined: 1-October 08
.I've tried writing to different folders...nothing...I've enabled the "Blocked Content"...nothing. 
Any other insights would be great.
Thanks!

 Oct 1 2008, 03:50 PM


HiTechCoach

The ExportXML is probably being blocked by the sandbox mode in 2007.


ee:
Functions and properties in Access 2007 blocked by sandbox mode ne postoji stranica

UtterAccess VIP
Posts: 19,037
Joined: 29-September 03
From: Oklahoma City, Oklahoma

 Oct 2 2008, 02:48 PM


frerbe

I was really excited when I saw your post...but unfortunatley it did not work. I'll keep on searching and
let you all know what I find out.
Posts: 3 Thanks for your help.
Joined: 1-October 08

 Feb 19 2010, 04:32 PM


gino5555

Was this problem ever resolved? I am using XP and Access 2003 from both my desktop and laptop.
My laptop refuses to import/export XML files. Everything is working fine (same files) on my desktop.
Posts: 3 Even as simple as clicking a table then choosing Export.

/conversion/tmp/activity_task_scratch/552588391.doc
1329
Joined: 16-June 05 get the same error, but without an error code number.

/conversion/tmp/activity_task_scratch/552588391.doc
1429
https://www.access-programmers.co.uk/forums/threads/exporting-from-access-to-excel-run-time-
error-31532.276799/

Exporting from Access to Excel Run Time Error 31532 (1


Viewer)
  Thread startermccoydo 
  Start dateApr 21, 2015
Local time
Today, 09:58
Joined
Apr 16, 2015
Messages
5
Apr 21, 2015

 #1

Hi there, I'm trying to export queries from access to excel using the DoCmd option. The
code (see below) works to a point - it exports some of the queries before I get a run time
error:

"31532: Microsoft Access was unable to export the data".

The worksheet tabs also do not pick up the query name but instead return what looks like a
temporary ID (e.g. ~TMPCLP118431). Have tried different file locations and versions of excel
but the same thing keeps happening. Any ideas?

Thanks in advance for your help.

Code:Copy to clipboard
Sub ExportAllQueries()

Dim qdf As QueryDef

Dim db As Database

Set db = CurrentDb

For Each qdf In db.QueryDefs


DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, qdf.Name,
"C:\Users\mccoydo\Desktop\AllQueries.xls"
Debug.Print qdf.Name
Next

End Sub

/conversion/tmp/activity_task_scratch/552588391.doc
1529
pbaldy
Wino Moderator
Staff member
Local time
Today, 01:58
Joined
Aug 30, 2003
Messages
34,184
Apr 21, 2015

 #2

There will be more than just your saved queries in that collection (rowsources, etc). I would
test the name for starting with "qry" or whatever, to exclude the other items.

M
mccoydo
New member
That sorted it pbaldy. I put in an if statement before the DoCmd "If Left(qdf.Name, 3) =
"qry" Then..." and that worked.

Thanks!

/conversion/tmp/activity_task_scratch/552588391.doc
1629
http://www.registry-clean-up.net/knowledge-base/errors/runtime-errors/error-31532-
microsoft-office-access-was-unable-to-export-the-data

Error 31532 is a kind of Runtime error that is found in the Microsoft Windows operating
systems. The file can be found for Microsoft Access. Microsoft Office Access was
unable to export the data has a popularity rating of 1 / 10.
Errors
This tutorial contains information on Error 31532 or otherwise known as Microsoft Office
Access was unable to export the data. Errors such as Microsoft Office Access was
unable to export the data indicate your machine has faulty hardware or software that
should be fixed when possible. Below is information on how to repair Error 31532 and
get your computer back to normal.

Signs of Error 31532:


 When your computer freezes or locks up at random.
 When your computer crashes when you are running Microsoft Access.
 If Microsoft Office Access was unable to export the data pops up and causes a program to
shutdown or your computer to crash.
 Your computer is running slow, taking a long time to boot up, and you suspect Error 31532 by
Microsoft Access is the cause.

What Causes Runtime Errors Like Error 31532?


There are several causes of runtime errors like Microsoft Office Access was unable to
export the data, such as viruses, out of date drivers, missing files or folders, incomplete
or poor installation, and registry errors. They can also occur due to an issue with the
computer’s memory, which may often be due to a hardware problem. In some cases
there was an issue installing Microsoft Access and an error occurred.

/conversion/tmp/activity_task_scratch/552588391.doc
1729
How to Fix Microsoft Office Access was unable to export the
data
Follow the step by step instructions below to fix the Error 31532 problem. We
recommend you do each in order. If you wish to skip these steps because they are too
time consuming or you are not a computer expert, see our easier solution below.

Step 1 - Uninstall and Reinstall Microsoft Access


If the Microsoft Office Access was unable to export the data is a result of using
Microsoft Access, you may want to try reinstalling it and see if the problem is fixed.
Please follow these steps:
Windows XP
1. Click “Start Menu”.
2. Click “Control Panel”.
3. Select the “Add or Remove” program icon.
4. Find the Error 31532 associated program.
5. Click the Change/Remove button on the right side.
6. The uninstaller pop up will give you instructions. Click “okay” or “next”  or “yes” until it is
complete.
7. Reinstall the software.

Windows 7 and Windows Vista


1. Click “Start Menu”.
2. Click “Control Panel”.
3. Click “Uninstall a Program” which is under the “Programs” header.
4. Find the Error 31532 associated program.
5. Right click on it and select “Uninstall”.
6. The uninstaller pop up will give you instructions. Click “okay” or “next”  or “yes” until it is
complete.
7. Reinstall the software and run the program.

Windows 8, 8.1, and 10


1. Click “Start Menu”.
2. Click “Programs and Features”.
3. Find the software that is linked to **insert file name**.
4. Click Uninstall/Change.
5. The uninstaller will pop up and give you instructions. Click “okay” and “next” until it is
complete.
6. Restart your computer.

/conversion/tmp/activity_task_scratch/552588391.doc
1829
7. Reinstall the software and run the program.

Step 2 - Remove Registry Entry related to Error 31532

WARNING: Do NOT edit the Windows Registry unless you absolutely know what
you are doing. You may end up causing more trouble than you start with. Proceed at your OWN
RISK.
1. Create a backup of registry files.
2. Click “Start”.
3. Type regedit, select it, and grant permission in order to proceed.
4. Click HKEY LOCAL MACHINE>>SOFTWARE>>Microsoft>>Windows>>Current
Version>>Uninstall.
5. Find the Microsoft Office Access was unable to export the data software from the list you
wish to uninstall.
6. Select the software and double click the UninstallString icon on the right side.
7. Copy the highlighted text.
8. Exit and go to the search field.
9. Paste the data.
10. Select Okay in order to uninstall the program.
11. Reinstall the software.

Step 3 – Ensure Junk Isn’t Causing Microsoft Office Access was unable to
export the data
Any space that isn’t regularly cleaned out tends to accumulate junk. Your personal
computer is no exception. Constant web browsing, installation of applications, and even
browser thumbnail caches slow down your device and in the absence of adequate
memory, can also trigger a Microsoft Office Access was unable to export the data error.
So how do you get around this problem?
 You can either use the Disk Cleanup Tool that comes baked into your Windows
operating system.
 Or you can use a more specialized hard drive clean up solution that does a thorough job
and flushes the most stubborn temporary files from your system.
Both solutions may take several minutes to complete the processing of your system
data if you haven’t conducted a clean up in a while. The browser caches are almost a
lost cause because they tend to fill up quite rapidly, thanks to our constantly connected
and on the go lifestyle. Here’s how you can run the Window’s Disk Cleanup Tool,
without performance issues or surprises.
 For Windows XP and Windows 7, the program can be ran from “Start” and from the
“Command Prompt”.

/conversion/tmp/activity_task_scratch/552588391.doc
1929
o Click “Start”, go to All Programs > Accessories > System Tools, click Disk Cleanup.
Next choose the type of files you wish to remove, click OK, followed by “Delete Files”.
o Open up the Command Prompt, type “c:\windows\cleanmgr.exe /d” for XP and
“cleanmgr” for Windows 7. Finish by pressing “Enter”.
 For Windows 8 and Windows 8.1, the Disk Cleanup Tool can be accessed directly from
“Settings”. Click “Control Panel” and then “Administrative Tools”. You can select the drive that
you want to run the clean up on. Select the files you want to get rid of and then click “OK” and
“Delete Files”.
 For Windows 10, the process is simplified further. Type Disk Cleanup directly in the
search bar and press “Enter”. Choose the drive and then the files that you wish to wipe. Click
“OK”, followed by “Delete Files”.
The progressive ease with which the Cleanup Tool can be used points to the growing
importance of regularly deleting temporary files and its place in preventing Microsoft
Office Access was unable to export the data.

PRO TIP:
Remember to run the Disk Cleanup as an administrator.

Step 4 – Fix Infections and Eliminate Malware in Your PC

How do you gauge if your system is infected with a


malware and virus?
Well, for one, you may find certain applications misbehaving.
And you may also see the occurrence of Error 31532.
Infections and malware are the result of:
 Browsing the Internet using open or unencrypted public Wi-Fi connections
 Downloading applications from unknown and untrustworthy sources
 Intentional planting of viruses in your home and office networks
But thankfully, their impact can be contained.

/conversion/tmp/activity_task_scratch/552588391.doc
2029
 Enter “safe mode” by pressing the F8 key repeatedly when your device is restarting.
Choose “Safe Mode with Networking” from the Advanced Boot Options menu.
 Back up all the data in your device to a secure location. This is preferably a storage unit
that is not connected to your existing network.
 Leave program files as is. They are where the infection generally spreads from and may
have been compromised.
 Run a thorough full-system scan or check of an on-demand scanner. If you already have
an antivirus or anti-malware program installed, let it do the heavy lifting.
 Restart your computer once the process has run its course.
 Lastly, change all your passwords and update your drivers and operating system.

PRO TIP: Are you annoyed by the frequent updates to your antivirus program? Don’t
be! These regular updates add new virus signatures to your software database for exponentially
better protection.

Step 5 – Return to the Past to Eliminate Error 31532


The steps outlined up until this point in the tutorial should have fixed Microsoft Office
Access was unable to export the data error. But the process of tracking what has
caused an error is a series of educated guesses. So in case the situation persists, move
to Step 5.
Windows devices give users the ability to travel back in time and restore system
settings to an uncorrupted, error free state. This can be done through the convenient
“System Restore” program. The best part of the process is the fact that using System
Restore doesn’t affect your personal data. There is no need to take backups of new
songs and pictures in your hard drive.
 Open “Control Panel” and click on “System & Security”.
 Choose the option “System”.
 To the left of the modal, click on “System Protection”.
 The System Properties window should pop-up. You’ll be able to see the option “System
Restore”. Click on it.
 Go with “Recommended restore” for the path of least hassles and surprises.
 Choose a system restore point (by date) that will guarantee taking your device back to
the time when Error 31532 hasn’t been triggered yet.
 Tap “Next” and wrap up by clicking “Finish”.
If you’re using Windows 7 OS, you can reach “System Restore” by following the path
Start > All Programs > Accessories > System Tools.

Step 6 - Error 31532 Caused by Outdated Drivers

/conversion/tmp/activity_task_scratch/552588391.doc
2129
Updating a driver is not as common as updating your operating system or an application
used to run front-end interface tasks.
Drivers are software snippets in charge of the different hardware units that keep your
device functional.
So when you detect an Microsoft Office Access was unable to export the data error,
updating your drivers may be a good bet. But it is time consuming and shouldn’t be
viewed as a quick fix.
Here’s the step-by-step process you can go through to update drivers for Windows 8,
Windows 8.1 and Windows 10.
 Check the site of your hardware maker for the latest versions of all the drivers you need.
Download and extract them. We strongly advice going with original drivers. In most cases,
they are available for free on the vendor website. Installing an incompatible driver causes
more problems than it can ever fix.
 Open “Device Manager” from the Control Panel.
 Go through the various hardware component groupings and choose the ones you would
like to update.
 On Windows 10 and Windows 8, right-click on the icon of the hardware you would like to
update and click “Update Driver”.
 On Windows 7 and Vista, you right-click the hardware icon, choose “Properties”,
navigate to the Driver panel, and then click “Update Driver”.
 Next you can let your device automatically search for the most compatible drivers, or you
can choose to update the drivers from the versions you have on your hard drive. If you have
an installer disk, then the latter should be your preferred course of action. The former may
often get the driver selection incorrect.
 You may need to navigate a host of warnings from the Windows OS as you finalize the
driver update. These include “Windows can’t verify that the driver is compatible” and “Windows
can’t verify the publisher of this driver”. If you know that you have the right one in line, click
“Yes”.
 Restart the system and hopefully the Microsoft Office Access was unable to export the
data error should have been fixed.

Step 7 – Call the Windows System File Checker into Action

/conversion/tmp/activity_task_scratch/552588391.doc
2229
By now the Microsoft Office Access was unable to
export the data plaguing your device should have been fixed. But if you haven’t resolved
the issue yet, you can explore the Windows File Checker option.
With the Windows File Checker, you can audit all the system files your device needs to
operate, locate missing ones, and restore them. Sound familiar? It is almost like
“System Restore”, but not quite. The System Restore essentially takes you back in time
to a supposedly perfect set up of system files. The File Checker is more exhaustive.
It identifies what is amiss and fills the gaps.
 First and foremost, open up an elevated command prompt.
 Next, if you are using Windows 8, 8.1 or 10, enter “DISM.exe /Online /Cleanup-image
/Restorehealth” into the window and press Enter.
 The process of running the Deployment Image Servicing and Management (DISM) tool
may take several minutes.
 Once it completes, type the following command into the prompt “sfc /scannow”.
 Your device will now go through all protected files and if it detects an anomaly, it will
replace the compromised version with a cached version that resides at %WinDir
%\System32\dllcache.

Step 8 – Is your RAM Corrupted? Find Out.


Is it possible? Can the memory sticks of your device trigger Error 31532?
It is unlikely – because the RAM chips have no moving parts and consume little power.
But at this stage, if all else has failed, diagnosing your RAM may be a good move.
You can use the Windows Memory Diagnostics Tool to get the job done. Users who are
on a Linux or Mac and are experiencing crashes can use memtest86.
 Open up your device and go straight to the “Control Panel”.
 Click on “Administrative Tools”.
 Choose “Windows Memory Diagnostic”.
 What this built-in option does is it burns an ISO image of your RAM and boots the
computer from this image.

/conversion/tmp/activity_task_scratch/552588391.doc
2329
 The process takes a while to complete. Once it is done, the “Status” field at the bottom
of the screen populates with the result of the diagnosis. If there are no issues with your
RAM/memory, you’ll see “No problems have been detected”.
One drawback of the Windows Memory Diagnostic tool pertains to the number of
passes it runs and the RAM segments it checks.
Memtest86 methodically goes over all the segments of your memory – irrespective of
whether it is occupied or not.
But the Windows alternative only checks the occupied memory segments and may be
ineffective in gauging the cause of the Microsoft Office Access was unable to export the
data error.

Step 9 – Is your Hard Drive Corrupted? Find Out.


Your RAM or working memory isn’t the only culprit that may precipitate an Microsoft
Office Access was unable to export the data error. The hard drive of your device also
warrants close inspection.
The symptoms of hard drive error and corruption span:
 Frequent crashes and the Blue Screen of Death (BSoD).
 Performance issues like excessively slow responses.
 Errors like Error 31532.
Hard drives are definitely robust, but they don’t last forever.
There are three things that you can do to diagnose the health of your permanent
memory.
 It is possible that your device may have a hard time reading your drive. This can be the
cause of an Microsoft Office Access was unable to export the data error. You should eliminate
this possibility by connecting your drive to another device and checking for the recurrence of
the issue. If nothing happens, your drive health is okay.
 Collect S.M.A.R.T data by using the WMIC (Windows Management Instrumentation
Command-line) in the command prompt. To do this, simply type “wmic” into the command
prompt and press Enter. Next follow it up with “diskdrive get status”. The S.M.A.R.T status
reading is a reliable indicator of the longevity of your drive.
 Fix what’s corrupt. Let’s assume you do find that all isn’t well with your hard drive. Before
you invest in an expensive replacement, using Check Disk or chkdsk is worth a shot.
o Open the command prompt. Make sure you are in Admin mode.
o Type “chkdsk C: /F /X /R” and press “Enter”. “C” here is the drive letter and “R”
recovers data, if possible, from the bad sectors.
o Allow the system to restart if the prompt shows up.
o And you should be done.
These steps can lead to the resolution you’re seeking. Otherwise the Microsoft Office
Access was unable to export the data may appear again. If it does, move to Step 10.

/conversion/tmp/activity_task_scratch/552588391.doc
2429
Step 10 – Update Windows OS

Like the software applications you use to render


specific tasks on your device, the Operating System also requires periodic updates.
Yes, we’ve all heard the troubling stories.
Devices often develop problems post unfinished updates that do not go through. But
these OS updates include important security patches. Not having them applied to your
system leaves it vulnerable to viruses and malware.
And may also trigger Error 31532.
So here’s how Windows 7, Windows 8, Windows 8.1 and Windows 10 users can check
for the latest updates and push them through:
 Click the “Start” button on the lower left-hand corner of your device.
 Type “Updates” in the search bar. There should be a “Windows Update” or “Check for
Updates” option, based on the OS version you’re using.
 Click it. The system will let you know if any updates are available.
 You have the convenience of choosing the components of the update you’d like to push
through. Always prioritize the security updates.
 Click “OK” followed by “Install Updates”.

Step 11 – Refresh the OS to Eliminate Persistent Microsoft Office Access was


unable to export the data Error
“Windows Refresh” is a lifesaver.
For those of you who are still with us and nothing has worked to eliminate the Error
31532, until recently, a fresh install of Windows would have been the only option.
Not anymore.
The Windows Refresh is similar to reinstalling your Windows OS, but without touching
your personal data. That’s hours of backup time saved in a jiffy.
Through the Refresh, all your system files become good as new. The only minor
annoyance is the fact that any custom apps you’ve installed are gone and the system
applications you had uninstalled are back.

/conversion/tmp/activity_task_scratch/552588391.doc
2529
Still, it is the best bet as the final step of this process.
 Enter the “Settings” of your PC and click on “Change Settings”.
 Click “Update and recovery” and then choose “Recovery”.
 Select “Keep my files”. This removes apps and settings, but lets your personal files live
on.
 You’ll get some warning messages about the apps that will be uninstalled. If you’ve gone
through a recent OS upgrade, the Refresh process makes it so that you can’t go back to your
previous OS version – if you should ever feel the need to do it.
 Click the “Refresh” button.
Are you using an older version of Windows that doesn’t come with the power to
“Refresh”?
Maybe it is time to start from scratch.
 Enter your BIOS set-up.
 This is where you need to change your computer’s boot order. Make it so that the boot
happens not from the existing system files, but from the CD/DVD Drive.
 Place the original Windows disk in the CD/DVD drive.
 Turn on or restart the device.
 Choose where you’d like the system files to be installed.
 Your PC will restart several times as the process runs its course.

FAQ's

Do Runtime Errors Mean I Have to Buy a New Computer?


No, you do not if you are battling errors like Microsoft Office Access was unable to
export the data and like Microsoft Office Access was unable to export the data. Runtime
errors generally occur due to software issues and can be sorted out easily. In some
cases, bad or aging hardware may be the cause, but such components can also be
replaced. Hence, there’s usually no need to buy a new computer due to runtime errors.

Should I Update My Drivers if There are Runtime Errors Like Error


31532?
Drivers are a piece of software that the computer uses to communicate properly with the
hardware and to Windows. When they can no longer communicate, such as when faulty
or old, this can cause many different errors - Runtime Errors included. If you are
experiencing problems like Error 31532, we do recommend keeping your drivers
updated.

/conversion/tmp/activity_task_scratch/552588391.doc
2629
How Long Will It Take to Fix Runtime Errors like Microsoft Office Access
was unable to export the data?
Depending on the problem, it may take anywhere from five minutes to fifty minutes. The
most time consuming process is finding what’s causing the problem, it may be a
hardware issue or a software glitch. Once the issue has been correctly identified, it only
takes a few minutes to solve the problem. Using a software can help you save time
since it works in a specifically designed way solving the problem in a quick manner.

Start Download Now

Author:

Curtis Hansen has been using, fiddling with, and repairing computers ever since he was a little
kid. He contributes to this website to help others solve their computer issues without having to
buy a new one.

https://stackoverflow.com/questions/10486948/exporting-multiple-access-tables-to-single-xml

exporting multiple access tables to


single XML
Ask Question
Asked 8 years, 1 month ago
Active 1 year, 5 months ago
Viewed 8k times
6
I have multiple Microsoft Access tables that I want exported into a single XML file. How do I
manipulate the order and hierarchy of the tables into the XML structure that I want? In essence, I
want to be able to reverse the import XML process, which automatically breaks down the data into
multiple tables. I can use VBA, SQL, and any built-in export function at my disposal.

xml ms-access vba
share  improve this question  follow 
asked May 7 '12 at 18:13

/conversion/tmp/activity_task_scratch/552588391.doc
2729
david wingerslaugh
7311 silver badge55 bronze badges
add a comment
2 Answers
Active OldestVotes
5
I use the attached to produce a 3 million line nested xml in about five minutes.

There are two key items,

1) a simple piece of VB,

Public Function Export_ListingData()

Dim objOtherTbls As AdditionalData

On Error GoTo ErrorHandle


Set objOtherTbls = Application.CreateAdditionalData
objOtherTbls.Add "ro_address"
objOtherTbls.Add "ro_buildingDetails"
objOtherTbls.Add "ro_businessDetails"
objOtherTbls.Add "ro_businessExtras"
objOtherTbls.Add "ro_businessExtrasAccounts"
objOtherTbls.Add "ro_businessExtrasAccom"
objOtherTbls.Add "ro_businessExtrasAccom2"

Application.ExportXML ObjectType:=acExportTable, _
DataSource:="ro_business", _
DataTarget:="C:\Users\Steve\Documents\Conversions\ListData.xml", _
AdditionalData:=objOtherTbls
Exit_Here:
MsgBox "Export_ListingData completed"
Exit Function
ErrorHandle:
MsgBox Err.Number & ": " & Err.Description
Resume Exit_Here
End Function
2) Linking the tables in relationship manager using joins from primary to FOREIGN keys.

If there are no relationships the code will produce a sequential xml file, if there are relationships
between primary keys you will get a 31532 error and the data export will fail.

share  improve this answer  follow 


edited Mar 1 '15 at 0:37

Jeffrey Bosboom
11.4k1414 gold badges6767 silver badges8383 bronze badges

/conversion/tmp/activity_task_scratch/552588391.doc
2829
answered Mar 1 '15 at 0:09

rathbst
7111 silver badge22 bronze badges
add a comment
3
here is the solution via VBA:
http://msdn.microsoft.com/en-us/library/ff193212.aspx
create a from and put a button on it. right click on the button and choose "build event" and past the
following code:

Dim objOtherTbls As AdditionalData

Set objOtherTbls = Application.CreateAdditionalData

'Identify the tables or querys to export


objOtherTbls.Add "internet"
objOtherTbls.Add "mokaleme"

'Here is where the export takes place


Application.ExportXML ObjectType:=acExportTable, _
DataSource:="internet", _
DataTarget:="C:\myxml.xml", _
AdditionalData:=objOtherTbls

MsgBox "Export operation completed successfully."


you have to type the name of your tables here and between quotations:

objOtherTbls.Add "internet"
objOtherTbls.Add "mokaleme"

DataSource:="internet"
share  improve this answer  follow 
edited Mar 25 '13 at 6:47
answered Mar 25 '13 at 6:30

PersianMan
2,57122 gold badges1414 silver badges2020 bronze badges
add a comment

https://www.tek-tips.com/viewthread.cfm?qid=1403135

/conversion/tmp/activity_task_scratch/552588391.doc
2929

You might also like