Hello Jim
Do you have any controls on your report named either "APPR_UNCOMMITTED_AMOUNT_$" or "Total_Budget"?
The #Name error usually occurs when there is an ambiguous or circular reference to a field or control in an expression. It is, however, very strange that it works briefly after a zoom, and then breaks again...
Something you might try is adding the expression as a calculated field in your RecordSource query, and then binding the new field to your textbox. I often find that calculated fields are less flaky and perform better than calculated controls.
Best wishes,
Graham
> From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Jim Wagner
> Sent: Friday, 2 August 2013 11:19 a.m.
> To: MS_Access_Professionals@yahoogroups.com
> Subject: Re: [MS_AccessPros] #Name? Error is crazy
>
>
> This is the sql behind the report. The fields are mostly from datawarehouse tables.
>
> SELECT OURAPPROPRIATIONDATA![APPR_UNCOMMITTED_AMOUNT_$]-(PENDMTL!ORDERED+PENDMTL!RECEIVED) AS Actual_Balance, PENDMTL.ORDERED, PENDMTL.RECEIVED, OURAPPROPRIATIONDATA.[APPR_APPROVED_AMOUNT_$], OURAPPROPRIATIONDATA.[APPR_CURRENT_MODIFIED_AMOUNT_$], OURAPPROPRIATIONDATA.[APPR_PRE_ENCUMBERED_AMOUNT_$], OURAPPROPRIATIONDATA.[APPR_ENCUMBERED_AMOUNT_$], OURAPPROPRIATIONDATA.[APPR_EXPENDED_AMOUNT_$], OURAPPROPRIATIONDATA.[APPR_UNOBLIGATED_AMOUNT_$], OURAPPROPRIATIONDATA.[APPR_UNCOMMITTED_AMOUNT_$], OURAPPROPRIATIONDATA.PYC, OURAPPROPRIATIONDATA.budget, OURAPPROPRIATIONDATA.NewJC, ([OURAPPROPRIATIONDATA]![budget]+Nz([OURAPPROPRIATIONDATA]![PYC])) AS Total_Budget, SHOPS.SUP_NAME, SHOPS.SHOP, SHOPS.[Footnotes for Reports], PENDING.Total
> FROM PENDING RIGHT JOIN ((OURAPPROPRIATIONDATA INNER JOIN PENDMTL ON OURAPPROPRIATIONDATA.NewJC = PENDMTL.ACCOUNT) LEFT JOIN SHOPS ON OURAPPROPRIATIONDATA.NewJC = SHOPS.ACCOUNT) ON PENDING.Account = OURAPPROPRIATIONDATA.NewJC
> WHERE (((([OURAPPROPRIATIONDATA]![budget]+[OURAPPROPRIATIONDATA]![APPR_ENCUMBERED_AMOUNT_$]+Nz([OURAPPROPRIATIONDATA]![PYC])))>0))
> ORDER BY OURAPPROPRIATIONDATA.NewJC;
>
> Jim Wagner
> ________________________________
>
> ________________________________
> From: luvmymelody <luvmymelody@yahoo.com>
> To: MS_Access_Professionals@yahoogroups.com
> Sent: Thursday, August 1, 2013 4:07 PM
> Subject: [MS_AccessPros] #Name? Error is crazy
>
>
>
> Hello all,
>
> I have a report that has control with the following expression
>
> =IIf([Total_Budget]=0,0,[APPR_UNCOMMITTED_AMOUNT_$]/[Total_Budget])
>
> When the user runs the report, they get the #Name? error. If I go into the control source and click zoom and then OK, and then run the report the values are shown and correct. It is very frustrating. I have retyped the expression several times and that it does not work.
>
> Thank You for your help
>
> Jim Wagner
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar