How do I specify what records are shown in a query?

  • Thread starter Thread starter jkh
  • Start date Start date
J

jkh

Basically I have a query that makes a list for me.
I want to be able to "split" my query into several "pages".
I export my query to an excel spreadsheet. I link the spreadsheet to my
powerpoint slides. The problem is that my query is too big to fit onto one
slide on my powerpoint slides, and the text is difficult to read because its
too small. I would like to be able to "split" the query into several "pages"
that only show about 25 Records each, so that I dont have to go into excel
and do this manually. I can make the query show the first 25 records, but
how do I make it show 25-50? and then 50-75....etc?
 
Seems to me it would be easier to copy the portion of the Excel for one
slide, paste special - linked Excel spreadsheet. Then copy the next part of
the Excel for the next slide.
 
What you're asking is not something that is simple in Access, nor is it
something commonly done. It's more like what happens on an ASP .Net
page.

The only reason for not simply copy/paste the entire dataset into one
Excel worksheet and chopping it up there would be if you automate the
entire process. Is that what you had in mind?

If so, here's what you might do:
1) Forget the queries. All you need is a single query with ALL the data
2) Create a Function that uses Excel Automation to create and load worksheets
3) Loop through your query data, loading n number of rows per worksheet.

Excel automation isn't difficult, but it isn't trivial either. You'll need to do some
VBA coding, and there is no simple plug-and-play code for what you want to do.

Here's an article I wrote for DBJ. It's a good starting point. There are probably
other articles out at DBJ, maybe even ones I wrote, I forget just now, but this one
is a good start

http://www.databasejournal.com/features/msaccess/article.php/3563671/Export-Data-To-Excel.htm
 
Back
Top