#Name Error on Calculated Text Box on Form

scuddersm

Registered User.
Local time
Today, 18:08
Joined
Mar 9, 2011
Messages
31
Hello all,

I am having some issues with this error showing up on my forms. I have a calculated field that is the result of 2 queries. The first query gives me the count of assigned and trained personnel and the second query divides the results and displays a percentage. Both of the queries run correctly and display the results. However when I try and attach the percentage field from the query to a txt box on my form I get a #name? error. I have tried numerous things to fix it with no sucess. I have included a sample of what I am doing to see if anyone out there has the answer. Its probably a quick fix but it currently eludes me.

Thanks for any help!

Scott
 

Attachments

You can't refer to it that way. If the field isn't in the form's record source, you can use a DLookup to get the value:

=DLookUp("[Pct]","[qryYB Pct]")
 
Sorry, you can't refer to a query like that from a text box. You can bind the form to that query and then bind that control to that field or you can use a DLookup:

=Nz(DLookUp("Pct","[qryYB Pct]"),0)
 
You guys are awesome!! Fixed problem. Even was able to use conditional formating to color code my results. Thanks again
 

Users who are viewing this thread

Back
Top Bottom