pgmtkl
asked on
Access 2007 query export to excel template
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.
ASKER
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([Tb l_FY12.Day ]="Sun","2 ",IIf([Tbl _FY12.Day] ="Mon","3" ,IIf([Tbl_ FY12.Day]= "Tue","4", IIf([Tbl_F Y12.Day]=" Wed","5",I If([Tbl_FY 12.Day]="T hu","6",II f([Tbl_FY1 2.Day]="Fr i","7","99 "))))))) AS WkdaysortFROM tbl_milestones RIGHT JOIN FY12 ON tbl_milestones.[PlannedDat e] = FY12.[Date];
qrycal.xlsx
Project-Calendar-template.xlsx
SELECT FY12.ID, FY12.Date, FY12.Period, FY12.Week, FY12.Day, tbl_milestones.PJectID, tbl_milestones.PlannedDate
qrycal.xlsx
Project-Calendar-template.xlsx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BTW you can test these functions as I did above by using the Immediate Pane - press Ctl+G
Thanks, glad to help.
The reference the tables/sheets and explain what you want to acheieve.