#Name? in Report

  • Thread starter Thread starter Steven Phillips via AccessMonster.com
  • Start date Start date
S

Steven Phillips via AccessMonster.com

Hello,
When I attempt to update my report I get the error #NAME?. Is there
anything wrong with the expression below. I'm lost...
=[Total month to date Periphery Grind Kyon Query]![SumOfSumOfPieces]
Steve
 
Steven said:
Hello,
When I attempt to update my report I get the error #NAME?. Is there
anything wrong with the expression below. I'm lost...
=[Total month to date Periphery Grind Kyon Query]![SumOfSumOfPieces]
Steve

is your report based on the query "Total month to date Periphery Grind
Kyon Query"? if not you may have problems with that statement, you may
have to do a SQL Select statement instead, or open a recordset with
code..

also, is your text box in the Report Footer, or Group Footer?

Mark
(e-mail address removed)(no dashes)
http://access-pro.tripod.com
 
Thanks,
What I'm attempting is a text box in a report with the control source set
as mentioned above. I don't know if this is the right approach. I have
several quaries which I cannot seem to link correctly and I need data from
each of them in one report.
 
A report can have only one record source.
A random table and field name can't be used as control source of a text box.
A SQL statement can't be used as the control source of a text box.

To retrieve values from other tables/queries you can use:
DLookup()
Subreports
Code
Row sources of list or combo boxes
 
Could I ask you to expand on this a little. Where exactly does this go, is
it a macro, etc. Also please help with the string info., I'm new at this. I
have no idea how to define the row information.
 
Hello,
When I attempt to update my report I get the error #NAME?. Is there
anything wrong with the expression below. I'm lost...
=[Total month to date Periphery Grind Kyon Query]![SumOfSumOfPieces]
Steve

I take it the [Total month to date Periphery Grind Kyon Query] is not
included in the report's record source.

Does this query return only one record?
If so, use:
=DLookUp("[SumOfSumOfPieces]","[Total month to date Periphery Grind
Kyon Query]")

If it returns more than one record, you will need to add a Where
clause to the above to assure you get the correct value returned.
See VBA Help on DLookUp, as well as
Where Clause + Restrict data to a subset of records
 
Fred,
It is not included in the record source because I need several records
from different queries. That is why I'm attempting to use the Dlookup
feature since my record source is not constant for the report. The querie
does return only one record, as do most of the others I am using. I have
tried combining them into one querie with no success-maybe a normalization
problem?? Does the Dlookup string you give me go directly into the text box?
 
Fred,
It is not included in the record source because I need several records
from different queries. That is why I'm attempting to use the Dlookup
feature since my record source is not constant for the report. The querie
does return only one record, as do most of the others I am using. I have
tried combining them into one querie with no success-maybe a normalization
problem?? Does the Dlookup string you give me go directly into the text box?

It's always a good idea, when replying to a previous post, to include
the relevant part of the previous post in the message. It makes it
easier for some one to make sense of your message.

If your query returns just one record, as you stated above, you can
write the expression directly in the control source of an UNBOUND text
control:
= DLookUp("[SumOfSumOfPieces]","[Total month to date Periphery Grind
Kyon Query]")

or you can write the expression using VBA:
[SomeControl] = DLookUp("[SumOfSumOfPieces]","[Total month to date
Periphery Grind Kyon Query]")

Or you can write it in another query:
NewColumn:DLookUp("[SumOfSumOfPieces]","[Total month to date Periphery
Grind Kyon Query]")
 
Back
Top