We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Access 2007 query export to excel template

pgmtkl
pgmtkl asked
on
Medium Priority
622 Views
Last Modified: 2013-11-27
Hi. I have an access query that is broken down by week 1 through 4 for a specific period. I have done access exports to multiple worksheets but what i would like to do with this is export the query to certain cells on the same worksheet depending on the date and week (1-4). The period doesnt follow the regular month. Is there a way to take one query with vba and export it based on a parameter? Or is the easiest way to create 4 queries and export to each cell? Any help is appreciated.
Comment
Watch Question

Travis HydzikVarious
CERTIFIED EXPERT

Commented:
Please upload (a cutdown version) of the database and workbook.

The reference the tables/sheets and explain what you want to acheieve.

Author

Commented:
Attached is a copy of the query and template that i would like report to look like. 2 tables are being used.

SELECT FY12.ID, FY12.Date, FY12.Period, FY12.Week, FY12.Day, tbl_milestones.PJectID, tbl_milestones.PlannedDate, tbl_milestones.Status, IIf([Tbl_FY12.Day]="Sat","1",IIf([Tbl_FY12.Day]="Sun","2",IIf([Tbl_FY12.Day]="Mon","3",IIf([Tbl_FY12.Day]="Tue","4",IIf([Tbl_FY12.Day]="Wed","5",IIf([Tbl_FY12.Day]="Thu","6",IIf([Tbl_FY12.Day]="Fri","7","99"))))))) AS WkdaysortFROM tbl_milestones RIGHT JOIN FY12 ON tbl_milestones.[PlannedDate] = FY12.[Date];      
qrycal.xlsx
Project-Calendar-template.xlsx
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
BTW you can test these functions as I did above by using the Immediate Pane - press Ctl+G

Commented:
Thanks, glad to help.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.