473,386 Members | 1,842 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,386 software developers and data experts.

Generating spreadsheets from Access

Greetings. I have an Access table with about 8,000 records. The key field is Region. The 8,000 records are distributed over 50 regions. What I would like to do is to generate 50 spreadsheets, programmatically, one for each region. How would I go about doing this in code? Any help would be appreciated.
Jul 26 '07 #1
1 1122
Lysander
344 Expert 100+
Greetings. I have an Access table with about 8,000 records. The key field is Region. The 8,000 records are distributed over 50 regions. What I would like to do is to generate 50 spreadsheets, programmatically, one for each region. How would I go about doing this in code? Any help would be appreciated.
I used the following code to do a similar thing
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, "qryCombinedWithChildren", "z:\bissau\CombinedWithChildren.xls", True
  2.  
What you could do is replace the hard coded query name and file name with variables and then loop through your regions running this code with different queries and file names.

Better still, you could use the same query, changing the region filter on it each time, but I cant remember how to do this of the top of my head.
Jul 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Rich Wallace | last post by:
Hello all, Looking for suggestions and tips if possible. I have an application running on a file server that utilizes the FileSystemWatcher to trap when any Excel files are saved by a user. I...
2
by: joe_d_builder | last post by:
I'm trying to do the following in Excel but am having a really tough time and am wondering if Access will do it.... I have a database matrix with about a half million rows in it and about a...
2
by: Jim S | last post by:
To my surprise and chagrin, newer versions of Access have disabled the functionality that lets users change the data in linked tables that point to a range in an Excel workbook. This is "because of...
2
by: rdemyan via AccessMonster.com | last post by:
I currently have code that brings up a form where the user can see a list of spreadsheets on my ftp site, select one and then download and import the spreadsheet into a table. All of this...
1
by: dsbsnag | last post by:
I am using Access 2003 on Windows XP I'm a school teacher and need help achieving the following: I have three spreadsheets with various information in them. But, they have a common cell named...
0
by: DrewYK | last post by:
I have the project that may never end in front of me. I am creating a routine that will take SpreadSheets from Excel and bring them into Access. I am not using any "DoCmd"s because the goal...
1
by: shank | last post by:
I'm generating excel spreadsheets online with many manufacturers. One particular manufacturer has 5000 more records than the next highest. When I query for that manuf the table does not form. Just...
3
by: Umoja | last post by:
Hi All, This seems like a simple thing, but I can’t seem to figure it out. I am familiar with transferring excel spreadsheets into access using the TransferSpreasheet function...
2
by: BlackEyedPea | last post by:
Hi I have no coding experience but am using access 2003 on XP in the hope that I can find some code that will.... Search a folder in my network & import any excel spreadsheets it finds within...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.