473,408 Members | 2,839 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,408 software developers and data experts.

Access 2010 VBA Code to Export to Excel automatically

I am trying to understand how to write VB code in Access 2010 to automatically populate the data into multiple excel spreadsheets. The data in the query encompasses all the data (by manager), but I need to separate the files by manager. The files need to be automatically exported to excel with the name of each manager which should give me 32 exported files. I'm new to VBA and have read posts for the last 2 days and can't figure it out.
Thanks in Advance
Feb 4 '14 #1
4 4624
ADezii
8,834 Expert 8TB
  1. Post the SQL behind the Query.
  2. How is the Data to populate each individual Spreadsheet, by Year, Months, etc.?
  3. Do these Spreadsheets exist, or do they need to be dynamically created?
  4. These and other questions we will need to know the answers to in order to assist you.
Feb 4 '14 #2
I'm not sure what you mean post the SQL behind the query?
The data is populate by manager, no time periods. Only one query exists and they need to dynamically created (split by manager).
Feb 5 '14 #3
zmbd
5,501 Expert Mod 4TB
vbissues
Deep breath.
Open the file
Open the stored query in design view
Right click on an empty area in the table display pane
In the pop-up menu select SQL View
You will now see the actual text behind the scenes
Select all of this text
Come back here
Click on the [CODE/] button in the tool bar
a pair of tags:
[code] [/code]
Will be inserted
Paste your SQL text between these tags.


-- You should also read thru:--

Check your Bytes Inbox... I've PM'd you a list of helpfull sites.
-z
Feb 5 '14 #4
mcupito
294 256MB
I think this is what you want?

Expand|Select|Wrap|Line Numbers
  1.  outputFileName = CurrentProject.Path & "\Reports\YourReportName.xlsx"
  2.             DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "YourName", outputFileName, True
This should help get you started.
Feb 6 '14 #5

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

Similar topics

3
by: Gaffar | last post by:
Hello, how to export ms-access tables information to excel sheet using ASP. please give sample code. it is very urgent to me or if u have no idea please give any news group to solve my...
3
by: prashantdixit | last post by:
Hi, I am trying to export excel data to text file in a particular format. The Format for each ROW of Excel is like IMAN_ROOT/bin/import_file -f=<Column A> -type=<Column B> -d=<Column C>...
2
by: Bill Boord | last post by:
I need to be able to shut off the AutoCorrect "feature" within Access 2010 code. I have utilized Application.SetOption with method strings for other startup requirements, but I cannot seem to find a...
9
by: Vernon Halsey | last post by:
I have an Access database that has been is use for approx 8 years. It was originally written in 2000 and subsequently converted to 2003. It consists of a client-unique front-end linked to a shared...
4
by: jbrumbau | last post by:
Hello, In Access 2010/2007, how do you prevent users from flipping into design view from the ribbon? I do not want to hide the entire ribbon (DoCmd.ShowToolbar "Ribbon", acToolbarNo) or even the...
3
AR Ratheesh
by: AR Ratheesh | last post by:
Hi, I have Access 2010 and When i'm trying to Export Text files to System folder ("C:\Windows\abc.asc"), in Windows 7 ultimate, couldn't export. But Previously i successfully exported to...
2
by: Paul Howarth | last post by:
My Access 2010 database is suddenly not appending Named Ranges from Excel into and Existing Access 2010 Table. I have not written any code. I simply right-click the Table-Import-Excel and follow...
5
lilp32
by: lilp32 | last post by:
I need to connect to a password protected Access database through Excel. Everything I've found while searching seems to imply that this is a bug that Microsoft has not fixed. Is this true? The...
26
by: VBA123novice | last post by:
I have very little experience with Access VBA so I'm hoping you can help me. I have an access 2010 database setup as follows: 4 tables linked to other access databases A union qry (qry_all)...
3
by: rahul2310 | last post by:
I have created joining letter in access 2010,as it is a letter it is not in column and row format. When i export report to word it does not shows report instead it shows column headings and data...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.