You're a trooper, Marshall!
> The only new information I can find in there is:
> "this is part of a very complex design in which ID's
> have many related ID's that may be related to many
> [ShortAddress]'s and many [LineDesc]'s"
So you ARE familiar with Dirk's bridled insanity? :) He was equally
confused when I approached him about this!
> That leaves me wondering what:
> "many related ID's that may be related to many
> [ShortAddress]'s and many [LineDesc]'s"
> means in terms of your (sub) report.
The design is:
[ParentID] > [ID]'s > [ShortAddress]'s > [LineDesc]'s
The subreport is returning [ID]'s > [ShortAddress]'s > [LineDesc]'s
according to the form filter.
The filter is designed to return the desired [ShortAddress] and
[LineDesc] for a given [ID] and [ParentID]. Let's say that the
[ParentID] is "123" with 4 related [ID]'s. 100123 is unique to
[ShortAddress] 123 Any Town, USA and [LineDesc] 02 - Thermoform.
100200 is unique to [ShortAddress] 244 Somewhere, USA and [LineDesc]
01 - Thermoform:
ID (ascending).| ShortAddress............| LineDesc
100123...........| 123 Any Town, USA...| 02 - Thermoform
100200...........| 244 Somewhere, USA| 01 - Thermoform
200345...........|.................................|
300444...........|.................................|
Let's say we want to filter for [ID]'s unique to [ShortAddress] 123
Any Town, USA and its [LineDesc] 02 - Termoform. We plug in the values
in the criteria form and the report returns:
ID (ascending).| ShortAddress............| LineDesc
100123...........| 123 Any Town, USA...| 02 - Thermoform
200345...........|.................................|
300444...........|.................................|
So the filter and subreport returns all [ID]'s unique to
[ShortAddress] 123 Any Town, USA as well as all [ID]'s that are NOT
unique to any [ShortAddress].
I hope this helps describe the complex mechanism. Everything works
properly and always has. I've just gotten to the point where I'd like
a text box to display the [ShortAddress] and [LineDesc] ONCE as a
label for the entire group of [ID]'s regardless that not all of them
are unique to any particular [ShortAddress].
I did give you some bad info before. I actually do have the text box
in the subreport's header. Sorry about that. Not sure how I got turned
around on that. Of course, depending on where it's placed in the
detail it will display either above or below the record. Sorry if this
caused any confusion!
Ultimately, I think what I'm trying to do with the text box is
impossible. I should probably just place it in the detail and have it
appear accordingly regardless of how ugly that will be.
Marshall Barton - 08 Apr 2008 20:05 GMT
>The design is:
>[ParentID] > [ID]'s > [ShortAddress]'s > [LineDesc]'s
[quoted text clipped - 41 lines]
>impossible. I should probably just place it in the detail and have it
>appear accordingly regardless of how ugly that will be.
So, I was right, the text box problem is because it is in
the subreport's header section and the effect you are seeing
is exactly as expected. With all that in mind, I think your
original question boils down to: How to display a specific
detail's value in the report header.
If all of the other details have Null in the relevant
fields, then you can use the Max function to find the
non-Null value:
="Facility ID/Line ID: " +
IIf([Forms]![frmQueryFGProcessingFacIDsLineIDs]![cbProfilesAssocsFacIDs]
Is Not Null, Max([ShortAddress]) & Max([LineID]) & " / " &
" " & Max([LineDesc]))
This approach can not isolate the ID of the detail with the
related data because there are non-Null values in all the
records.
If that expression does not meet your needs, then maybe you
can use Sorting and Grouping to sort the non-Null entry
first. The sort field/expressions would be like:
=IIf(ShortAddress Is Null, 2, 1) Ascending
ID Ascending

Signature
Marsh
MVP [MS Access]
jlute@marzetti.com - 08 Apr 2008 20:38 GMT
> So, I was right, the text box problem is because it is in
> the subreport's header section and the effect you are seeing
> is exactly as expected.
Yeah. So sorry about that confusion!
> With all that in mind, I think your
> original question boils down to: How to display a specific
> detail's value in the report header.
>
> If all of the other details have Null in the relevant
> fields...
Actually, other details can have values BUT they will be all the same
as what is filtered for.
> ...then you can use the Max function to find the
> non-Null value:
[quoted text clipped - 3 lines]
> Is Not Null, Max([ShortAddress]) & Max([LineID]) & " / " &
> " " & Max([LineDesc]))
Well, you're obviously an MVP for a reason! No way would I have gotten
that on my own. Thanks for sticking this out with me! I've learned yet
another "trick" in a long line of tricks!
I modified it just a tad to:
=+IIf([Forms]![frmQueryFGProcessingFacIDsLineIDs]!
[cbProfilesAssocsFacIDs] Is Not Null,Max([ShortAddress]) & " / " &
Max([LineID]) & " ● " & Max([LineDesc]))
[ShortAddress] is actually a concantenation that uses " ● " so I
thought I'd throw it in between [LineID] and [LineDesc] in order to be
consistent. I also removed "Facility ID/Line ID:" as it is obvious
when viewed.
WOW!!! I keep getting reminded that nothing appears to be impossible
with Access.
I just checked it against all scenarios and it returns properly. A
super, big thanks to you! This has been one of the most agonizing
problems I've ever tried to resolve and you did it with a snap!
Thanks!