I've been asked to look at this problem in a fairly complex database that I didn't write. Apparently this is the first time in 2-3 years this process has produced an error. Not being very strong with code, I thought I'd post this to see if you coding wizards spot something obvious.
For j = 1...
Wow, I looked right at that and had a brain fart. Didn't even register that you were talking about the report header/footer instead of the Page Sections.
I apologize for missing that. Also, I wasn't aware that you can't bind expressions in the Page Sections.
I moved my fields to the Report...
Sorry, I thought I covered everything.
1) does your report have a Record Source of your table/query?
Yes, it is table "tblWARNData"
2) did you move the text boxes to the Page Footer or Report Footer?
Page Footer
3) can you share any expressions you used in control sources?
Expression for...
I haven't changed anything on the report. All I did was move the body of the report from the detail section to the footer section (then the header section). The same text boxes whose Expressions work in the Detail section give me an #Error in the Header & Footer secions.
I also created a new...
When I move the text boxes from the detail section to the footer section, or place them in the header section, they display "Error"
It's as if the Expressions cannot complete their calculation because they're no longer tied to the table.
The report contains items such as:
- All Notices (records) received YTD
- All Notices received for this period
- Notices related to mass layoffs YTD & Period
- Notices related to plant closings YTD & Period
- Number of team interventions YTD & Period
Etc, etc
IOW, the items on the summary...
I have a report that displays summary data from the database, and I used a data table as its source. The summary data is displayed in the Details section of the report.
However, when I print the report, it prints a page for each record contained in the table, so I end up with 50 (so far) pages...
Thanks Duane, that works great and is simpler than the expression I was using.
If I want to use a second variable I would add it something like this?
=Sum(Abs(Year([EntryDate])=(Year(Date())) And ([IncidType]=6)))
(I have a hard time figuring out where the parens go.)
Randy,
Wow, it worked like a charm. I would never have figured that one out.
Thank you very much!!
Hopefully I can adapt that expression for the other 5 "YTD" calculations I have to include on this report. If not, you may see me again... :)
Thanks again,
Kerry
I can't get an expression to work because of the way a date is being stored in a text box.
txt box = frmRptCriteria.txtYYYY
Its control source is =Date()
It's formatted as YYYY
Even though its formatted as "YYYY" it stores a full date, 3/2/2007 instead of just 2007. This causes the following...
My summary report shows various record totals for YTD and Date Range entries. I was able to get a stmt to work for the Date Range fields, but not the YTD fields.
Report field = txtNoticesYTD
Source = tblWARNData
This report field is supposed to show a total of all records entered in the...
Here's the code I'm using in the Control Source of the report field:
=Sum(IIf(Year([EntryDate])=Year(Date()) And [IncidType]='6',1,0))
This is the error I'm getting now:
"The expression is typed incorrectly, or is too complext to be evaluated. For example, a numeric expression may contain...
Thanks PHV.
Unfortunately, I'm getting the same error with your code as I got with mine:
Extra ) in query expression
...even though there doesnt seem to be an extra one.
I'm having trouble with a field on a report. The field needs to show a sum of the records that have been entered in the calendar year, and also have a value of "6" in one of the table fields.
I wasn't sure how to make the report object know what year it is, so I thought of placing an invisible...
I'm trying to add code to a cmd button so that it will close the active form and a second form, then return the user to the main menu. However, I'm having trouble with the argument to close the 2nd form and need help with the syntax. Here's what I have:
Active form = frmReports
Second form =...
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.