ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MS Access Query Question (https://www.excelbanter.com/excel-programming/428737-ms-access-query-question.html)

Eric G

MS Access Query Question
 
I have several very simple queries in my Excel workbook that get summary data
from an Access back end file. The queries all return a single number -
usually a count of the number of items in a particular field that match
particular criteria. The query in Excel references a query in the Access
back end that does all the work and returns "Expr1" to Excel.

I noticed that even though I am only returning a single number, the query
sometimes takes up 2 or even 3 cells on the worksheet. I can tell this by
the fact that the "!" symbol (refresh query) lights up not only when I click
in the cell with the query, but also in one or two cells below that. I can
also tell by checking the "ResultRange.Count" in Visual Basic.

Why are these queries taking up extra cells? Is there a way to control/fix
that. It wouldn't be so bad if I knew it was always one extra cell, but
sometimes it's two extra cells, and this messes up my formatting!

Thanks in advance,

Eric
-------------------------
If toast always lands butter-side down, and cats always land on their feet,
what happen if you strap toast on the back of a cat and drop it?
Steven Wright (1955 - )


All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com