473,399 Members | 3,401 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,399 software developers and data experts.

Creating a calendar report in excel using MSAccess query data

cori25
83
I have data that I want to import from access into excel, I need to be able to pull in the data so that it can be automated to appear in calendar format. The dates are in the db, so I want it to be pulled into excel and distributed to the correct date on the calendar. I have had no luck yet......any help would be greatly appreciated

Thanks
Cori
Dec 21 '07 #1
7 10677
puppydogbuddy
1,923 Expert 1GB
I have data that I want to import from access into excel, I need to be able to pull in the data so that it can be automated to appear in calendar format. The dates are in the db, so I want it to be pulled into excel and distributed to the correct date on the calendar. I have had no luck yet......any help would be greatly appreciated

Thanks
Cori
Cori,

Try and follow these steps:
1. Construct a basic Access query that retrieves the data that you want to export to excel.
2. Go to the query object in the Access DB window, select new (for a new query), then select the crosstab query wizard, keeping in mind that you are using the wizard to construct a preliminary crosstab query, which you will be able to modify and refine as needed.
.
3. Respond to the Wizard's prompts as follows:
Data Source: your basic query from #1 above
Column Header: Your dateField
Value Column: the column that has the values for each date in the column header.
Row Header: all other columns from your source query

4. Refine your crosstab via the query grid until you have it diisplaying the data the way you want.

5. Place the following code behind a button on the form that you use to enter the data into the table. This is an example using the TransferSpreadsheet method to export the data to Excel. The general syntax is:
DoCmd.TransferSpreadsheet [transfertype][, spreadsheettype], tablename, filename[, hasfieldnames][, range]

An example to illustrate the transfer spreadsheet method.
Expand|Select|Wrap|Line Numbers
  1. Private Sub YourButton_Click()
  2.  
  3. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, YourCrosstabQueryname & Format(DateAdd("m", -0, Date), "MMM") & Format(Date, " yyyy"), "C:\Temp\FileName.xls", True
Dec 23 '07 #2
cori25
83
Thanks for the information. Although, I am not using a form to get the data, I have linked to an excel spreadsheet which pulls in the information. My goal is to automate this, so a form would not be necessary. Also, if I am not mistaken, this will just create an output similar to a pivot table report. I wanted an actual calendar with the data not just the raw data dumped into excel. Any other ideas?

Thanks!
Cori,

Try and follow these steps:
1. Construct a basic Access query that retrieves the data that you want to export to excel.
2. Go to the query object in the Access DB window, select new (for a new query), then select the crosstab query wizard, keeping in mind that you are using the wizard to construct a preliminary crosstab query, which you will be able to modify and refine as needed.
.
3. Respond to the Wizard's prompts as follows:
Data Source: your basic query from #1 above
Column Header: Your dateField
Value Column: the column that has the values for each date in the column header.
Row Header: all other columns from your source query

4. Refine your crosstab via the query grid until you have it diisplaying the data the way you want.

5. Place the following code behind a button on the form that you use to enter the data into the table. This is an example using the TransferSpreadsheet method to export the data to Excel. The general syntax is:
DoCmd.TransferSpreadsheet [transfertype][, spreadsheettype], tablename, filename[, hasfieldnames][, range]

An example to illustrate the transfer spreadsheet method.

Private Sub YourButton_Click()

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, YourCrosstabQueryname & Format(DateAdd("m", -0, Date), "MMM") & Format(Date, " yyyy"), "C:\Temp\FileName.xls", True
Dec 26 '07 #3
FishVal
2,653 Expert 2GB
Thanks for the information. Although, I am not using a form to get the data, I have linked to an excel spreadsheet which pulls in the information. My goal is to automate this, so a form would not be necessary. Also, if I am not mistaken, this will just create an output similar to a pivot table report. I wanted an actual calendar with the data not just the raw data dumped into excel. Any other ideas?

Thanks!
Could you give an example of calendar layout you want to get?
Additionally posting metadata of relevant dataset(s) would be nice.
Here is an example of how to post table MetaData :
Table Name=tblStudent
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; AutoNumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
Dec 27 '07 #4
NeoPa
32,556 Expert Mod 16PB
Registering interest.
Dec 28 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
I have data that I want to import from access into excel, I need to be able to pull in the data so that it can be automated to appear in calendar format. The dates are in the db, so I want it to be pulled into excel and distributed to the correct date on the calendar. I have had no luck yet......any help would be greatly appreciated

Thanks
Cori
I think you will need to look at using Excel Automation for this.
Dec 29 '07 #6
missinglinq
3,532 Expert 2GB
The more I read this thread the more confused I am! First you say "I have data that I want to import from access into excel." Then you say "I am not using a form to get the data, I have linked to an excel spreadsheet which pulls in the information."

Exactly where does this data come from; how is it inputted? It sounds like it originates in Excel. If this is true, why are you running it thru Access and then, seemingly, back into Excel? Is the calendar you want to fill in supposed to be in Access or Excel?

Linq ;0)>
Dec 31 '07 #7
cori25
83
This particular project is in regards to Overtime. I have there exceptions pulling from an other source into excel, which is linked to access. The output of this data is a mess so I clean it up in excel and link to access. From there I have other data in access that runs and needs the exceptions data before it is sent out to employees(in calendar format) so that they know what is available. It is necessary to have this data in access because there are quite a few more steps before the process is complete which needs to be done in access.

After the email is sent out with the OT Availabilty the employees interested in the shifts will go to a form I created in access and input what they want. Next I have to figure out how to allocate the OT if more then 1 person wants the shift...

Do you understand why I need the calendar format now? I know I can do it in a pivot table, but I feel this will be too confusing for the enduser to comprehend.
The more I read this thread the more confused I am! First you say "I have data that I want to import from access into excel." Then you say "I am not using a form to get the data, I have linked to an excel spreadsheet which pulls in the information."

Exactly where does this data come from; how is it inputted? It sounds like it originates in Excel. If this is true, why are you running it thru Access and then, seemingly, back into Excel? Is the calendar you want to fill in supposed to be in Access or Excel?

Linq ;0)>
Dec 31 '07 #8

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

Similar topics

1
by: Alan | last post by:
Hi there, Are there Excel charting gurus here?? If so then please read on... Sorry for the cross-post but I'm not familiar with the Excel groups. I've posted to asp.general because if I have...
5
by: Alan | last post by:
Hi there, Are there Excel charting gurus here?? If so then please read on... Sorry for the cross-post but I'm not familiar with the Excel groups. I've posted to asp.general because if I have...
24
by: Michael Malinsky | last post by:
I'm attempting to create a database which will take information from one (perhaps two) tables and utilize that information to return queries to a report designed in Excel. The general idea I...
1
by: Steven Stewart | last post by:
I have a user who has been using Excel for a while to keep statistics and print reports. She finds using it cumbersome because of long formulas and a lot of copying and pasting. I have designed...
2
by: Sami | last post by:
Could someone explain clearly how to go about doing this? I have tried setting up the structure on numerous occasions, but it never seems to work. Could someone please help me out? Thanks!
4
by: somanyusernamesaretakenal | last post by:
What I am trying to achieve: Basically I have generated a report in access. This report needs to be updated using excel. (Updating the new data, not changing existing data) What I did was I...
14
by: magmike | last post by:
Can I do anything with the calendar buttons? I want to display a number on the buttons. I'm using the calendar control on a form that sets a call back date and time. The user can click on the...
5
by: Sport Girl | last post by:
Hi again my great online assistants, just would like to say that i'm testing the script under unix , and after researches on the internet, i have realised that to resolve 500 Internal Server Error,...
4
by: timmg | last post by:
I have an application were users evaluate records and based on the amount of money involved answer between 17 and a 120 questions on one of three response forms. I have a master list of question...
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.