473,378 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Excel VBA query to Access DB not returning all rows

Hoping someone has some ideas on how to solve this issue:

I have a macro in excel which runs a query against an Access DB (it
actually calls a query inside of Access). The query is not bringing
back all of the records even though I can run the query directly in
Access or Microsoft Query and get all the records returned. For ease of
troubleshooting the query can be a simple select * call from the macro
to Access. Even with this basic call somehow all of the records are
still not being returned when called from the macro within excel.

As an example one query has around 15 missing records out of about 14
thousand total, one of which of course I need returned for processing
in Excel. I don't see anything different about the record I want
returned; only that it doesn't make it back to excel when calling
through the user initiated macro. At 14 thousand records I am well
within the 65 thousand row excel limit as well. Any ideas of what to
check for next?

Eric

Nov 13 '05 #1
3 4539

Are you using any kind of loop to read the recordset, or using any
values to define the beginning and end points in the array?

Nov 13 '05 #2


et******@hotmail.com wrote:
Hoping someone has some ideas on how to solve this issue:

I have a macro in excel which runs a query against an Access DB (it
actually calls a query inside of Access). The query is not bringing
back all of the records even though I can run the query directly in
Access or Microsoft Query and get all the records returned. For ease of
troubleshooting the query can be a simple select * call from the macro
to Access. Even with this basic call somehow all of the records are
still not being returned when called from the macro within excel.

As an example one query has around 15 missing records out of about 14
thousand total, one of which of course I need returned for processing
in Excel. I don't see anything different about the record I want
returned; only that it doesn't make it back to excel when calling
through the user initiated macro. At 14 thousand records I am well
within the 65 thousand row excel limit as well. Any ideas of what to
check for next?


You've only got 15 missing records. Can you easily identify which ones
they are? Is there some commonality? That's where I'd start, doing a
desk check against a selection of records that are displayed.

Edward

Nov 13 '05 #3
There is no loop, in the simple example I gave above it just brings
back the complete select * query to the worksheet and pastes it there.

I will try comparing the result set from the access query and the macro
query and maybe do a distinct filter to find the 15 records when I get
time.
Thanks for your feedback.
Eric

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kenneth | last post by:
How do I remove the limitation in Access that deny me from exporting 24000 rows and 17 columns (in a query) into Excel? Kenneth
12
by: Joe Stanton | last post by:
Hello Group I have a query that works in Oracle and SQL Server, but fails in Microsoft Access. The query is: SELECT data fromTABLE1 WHERE data>='A&' AND data<'A''' Here is my sample data:
3
by: John | last post by:
Is there a way to code the button that's available in the query window--microsoft excel icon that exports to excel. I know transferspreadsheet will do this---but I want the query, which is in a...
8
by: Jerome Ranch | last post by:
Okay So I've got pivot tables setup in Access 2003. Only about 30K records in the current 2005 databases...the pivots summarize the info in a number of nice ways. I need to get the pivot tables...
1
by: Jaime Leivers | last post by:
Here's a median function in access that you can call in any query. You could change this to any excel function you wanted. Most people can find the windows help file that says how to call an excel...
4
by: Hemant Shah | last post by:
Folks, I am having problem with an application that uses static SQL, the application basically browses through the table given start and end key most of the time it is processed from begining to...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
0
NeoPa
by: NeoPa | last post by:
Many of us have noticed that there are some very useful functions available to you when using Excel, but these same functions are not available, as standard, in Access. A particular issue I had...
1
by: stingaway | last post by:
Have an end user who prefers to see everything in Excel, neatly grouped. I know how to export to Excel - but is there a way to export a query from Access directly into Excel with groupings...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.