Export Selections From List Boxes to MS Excel

gautam89

Registered User.
Local time
Today, 12:37
Joined
Jul 19, 2007
Messages
13
Hi everyone,

I needed your assistance with a small problem I am having with list boxes in MS Access.

I have a list box that displays the results of a query. The query actually searches a Customer table for individuals or groups of customers.

I wanted to know if its possible to export the multiple records you select from a list box into an Excel file?

Another problem might be that the list box does not contain all the fields that need to be exported, nor does the query.

So I'm guessing, you'd have to get an array of all the ID numbers selected in the list box, query for them one by one, add them into a table, and then export the table to Excel. :eek:

Someone please help... :confused:
 
Another problem might be that the list box does not contain all the fields that need to be exported, nor does the query.
Add the fields to your query and run it again.
I wanted to know if its possible to export the multiple records you select from a list box into an Excel file?

File>Export??
Tools>Analyze it with Excel??
MS office help
 
doesnt work...

Well actually I need to be able to select certain records from the list box and export only those. That won't work with Files > Export > Excel

Any other ideas out there??
 
I tried the TejPal's sample database, but it gives an error when I try to export. I googled the error and found that it could be an incompatibility with MDAC version. I checked mine, but it was the latest one available.

Any other suggestions? Pls help... I really need to finish this access project for a high school summer internship!
 
Hmm..

It works fine on my PC with XP and Access 2003

Did you make sure that you had your references checked?

http://www.rogersaccesslibrary.com/Otherdownload.asp?SampleName='ExportAccessToExcelAsPivotTable.mdb'

He states you need these to work it.

References:
(a) Microsoft Excel Object library (version 9.0 or later)
(b) Microsoft Scripting RunTime
(c) DAO 3.6
 

Users who are viewing this thread

Back
Top Bottom