Export Access Query to Excel

E

Erika

I am using Office 2007 however my spreadsheet is saved in a 2003 format - I
am trying to export the query results to my spreadsheet however I am only
getting 6601 records instead of 20000

Any ideas?
 
J

Jerry Whittle

Show us the SQL of the query. Open the query in design view. Next go to
View, SQL View and copy and past it here.

Run the query and go to the last record. Anything strange with those last
records?

Next tell us exactly how you are doing the export. Going to the External
Data tab? Macro? Code?
 
E

Erika

SELECT dbo_TrailerSeal.AccountNo
FROM dbo_TrailerSeal
GROUP BY dbo_TrailerSeal.AccountNo;

There is nothing weird with the last records except that the first table I
export has 6601 records. Is there anything that saves this data so everytime
it exports the query date it only exports the same #. I did not have it save
the steps as suggested after running the export/

External Data Tab - Export - Excel
 
J

Jerry Whittle

Hi,

There's nothing saved or cached. Each time you run the query, it should
return the latest data.

The Group By will remove any duplicate records. Are you saying that you see
all 20000 records in the query or that the table has 20000 records?

You are saying that the last table has 6601 records and that the spreadsheet
has 6601 records. Are you trying to export more than one table into the same
spreadsheet? If so Access overwrites the spreadsheet each time that you
export into the same named spreadsheet. You would either need a new
spreadsheet name or some code to import each table into a different worksheet.
 
J

Jerry Whittle

Hi,

When you run the query, does it produce 20000 records or the 6601 records?

If you want zip up a copy of the database and send it to me at:

(e-mail address removed)

I really only need the table involved and the query. You could modify any
sensitive data with an update query.
 
E

Erika

I run the first query and export to excel it is 6601 records I run the second
query and export to excel it only exports 6601 records even though there are
20000
 
J

Jerry Whittle

Let's get back to the beginning. When you run the query how many records does
it return? When you export the query, are the number of records returned by
the query different that what is in the spreadsheet?
 

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