I pasted this prompt into BING Co Pilot and received this:
=Sum(IIf([ModeMasterTbl].[Week] = [Forms]![checkmax]![WeekNumber], [Total OT Hours], 0))
Upon further testing, this result looks good.
Thanks Dwight, I appreciate your help. Removed quotes with this syntax - resulting error message.
=(Sum((IIf([ModeMasterTbl].[Week]=[Forms]![checkmax]![WeekNumber],([Total OT Hours]),0),Null))
Any other suggestions?
I'm trying to use a form Control in a Form which I pass to a report header. This is a variable used in the report.
The Form Control is [Forms]![checkmax]![WeekNumber]
The DataSource for the report is called [ModeMasterTbl] where [Week] is a field in the table that I want to use to summarize...
Thanks Andy, The error is generated by the DoCmd statement:
DoCmd.SendObject acSendReport, "MTA_WeeklyOvertimeRprt_ByDept", strOutputFormat, strTo, strCC, , "All Department - Weekly OT Report", "Attached is the Weekly Overtime Report for All departments.", _
False...
...Function EmailReports()
Dim strOutputFormat As String
Dim strObjectName As String
strOutputFormat = "PDF Format (*.pdf)"
strObjectName = "MTA_WeeklyOvertimeRprt_ByDept.pdf"
'strOutputFormat = "JPG Format (*.jpg)"
'strOutputFormat = "XLS Format (*.xls)"
'GENERAL SYNTAX
'DoCmd.SendObject...
...Maintenance","Metro Transportation","Bus Maintenance","Bus Transportation"),IIf([CYBudPY]="PY",([Amount]),0),Null)))/[Forms]![checkmax]![WeekNumber])
Is there a wildcard character I can use to select ALL Departments? I tried using "*" but that did not work. Any suggestions would be...
OK Now I've converted all queries to select queries and now I am having difficulty calculating a moving YTD Average for the Amount. Week 2 for example is taking just the week 2 amount and dividing by 2 when I need the Amounts of week 1 and2 to be included in the YTD Average. Any suggestions on...
Hi Duane, I'm redesigning the solution as you've suggested. Convert all crosstab queries into select queries, union them, and then change the report reference. I will let you know if this resolves my issue. Thank you.
HI Duane - thank you for your response. UMD Bulldog Alum appreciates your Northern support!. Unfortunately I cannot un-crosstab the query as I have 4 crosstab queries in a union query which is the data source for the report. The 26 represents the current final column in data set and crosstab...
I have a text Box on a report with following calculation. [26] represents Week 26 on a Union Qry of crosstab queries which is the data source for the report.
=Sum((IIf([ModeName]="Bus Transportation",IIf([CYBudPY]="CY",(([26])),0),Null)))
This works fine.
In the Header of the Report I have...
I have a crosstab query which is returning a new record for each column header instead of 1 row per Mode.Name
TRANSFORM Sum(WK_25_OT_Qry.SumOfEXPN_AMT) AS SumOfSumOfEXPN_AMT
SELECT Mode.ModeName
FROM CalendarPayroll_TY INNER JOIN ((WK_25_OT_Qry INNER JOIN SOF_Dept_Roll_Up_Tbl ON...
Trying to implement this idea Duane. Receiving External Name not defined error. Not sure how to define this renamed object. My report name is defined as "RegionalScorecard-"
Trying to rename temporarily to "RegionalScorecard- & " & strEVPFName & ""
But receiving error message:
Any thoughts...
I am trying to combine a variable defined with my strObjectName to customize the report name which will be sent to many differnt recipients:
DoCmd.SendObject acSendReport, strObjectName, strOutputFormat, strEVPFEmail, "", "", "May Scorecard", _
"Attached is your May 2017 Scorecard. Please call...
One last twist to this solution. I am trying to customize the report name with the user name included which is the variable defined as & strEVPFName &. I did that in my output function with this:
DoCmd.OutputTo acReport, strObjectName, strOutputFormat...
That worked Duane!
DoCmd.SendObject acSendReport, strObjectName, strOutputFormat, strEVPFEmail, "", "", "May Scorecard", _
"Attached is your May 2017 Scorecard. Please call or email with any questions. Thank you.", False, ""
I also had EVPO instead of EVPF as strongmn helped me identify...
I think I moved it closer with this:
DoCmd.SendObject acSendReport, strObjectName, strOutputFormat, "& strEVPOEmail &", "", "", "May Scorecard", "Attached is your May 2017 Scorecard. Please call or email with any questions. Thank you.", False, ""
But it is not recognizing the email address...
When running a program with this output statement:
DoCmd.SendObject acSendReport, "strObjectName", "PDF Format (*.pdf)", rs("strEVPOEmail"), "", "", "May Scorecard", "Attached is your May 2017 Scorecard. Please call with any questions. Thank you.", False
I receive a compile error: Sub or...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.