View Full Version : Sorting and Grouping Question.


SirDrums
08-19-2009, 09:55 AM
I am no where near an expert in access so please bear with me here...

I was wondering if there is a way you can put some code in a text box that is inside a grouping that bypasses the grouping?

For example, I have a report that has two groups in it. It works fine for the most part. The problem seems to be that some of the data I need is filtered out by the grouping.

More detail:

I have a Pipe number that has a one to many relationship.

I use the first group to hide the Pipe numbers that are repeating.

the data that the Pipe number is related to has some fields that are the same

For example- the Pipe may have several sizes and those sizes can repeat accross sections of pipe. so you can have 5 rows in the query that say 6" for the size and three more that say 8". ( I hope you are stil with me here)
On the report they only want to see the size one time, so I use the second group for the size so You see something like this:

Pipe Number:
6"
8"

Problem is, there is a field in those rows that tell you where that particular piece is coming from and going to. In particular one that that tells where the pipe (as a whole) starts and ends.

So the report would look like this:

Pipe Number:
Start:
End:
6"
8"

Sometimes by grouping by size the rows of data that has the start end info gets filtered out.

Which is why I am wondering if there is a way to put code in a text box that can some how display this filtered out data without changing the format of the report (I ie show a runsize multiple time so I can get the data)

Make any sense whatsoever?

I will try and clear stuff up if I need to so please just ask. :)

SirDrums
08-21-2009, 01:05 PM
I guess I over explained things. Sorry

let me try again.

I have an object that is listed twice in a query becasue it has a one to many relation ship with a field in another table:

Object 1 6" To
Object 1 6" From

When I group by size in the report, the report seems to filter out the second instance:

Object 1 6" from

This is what I want in one part of the report. In another part I want to be able to list the "To" and "From" of Object 1.

But I think becase of the grouping, I can no longer access that second row of info.

Is there a way to access that info and keep the grouping?

georgedwilkinson
08-21-2009, 06:33 PM
The second explanation is not better than the first.

You need to explain the technical part of your question a little better...you have told us nothing about your table structure or your query...we don't care how far apart pipes are or how big they are when you need help. Just the facts about the technology currently in place that isn't working. Without that information, nobody has a clue what you're talking about.

SirDrums
08-24-2009, 06:07 AM
Sorry, didn't mean to make you mad.. I thought I was explaining my query...

um...ok...

This query is based on a query that pulls information from about 3 tables.

I dont really know how to explain the technical part as the database is part of a program we use, and I am learning about databases, queries and reports as I go.

I guess to take a shot at it. I have one table called tag_reg that holds the names of the objects in our project.

That table is joined to other tables via a primary key we call a key_tag.

In this case the key_tag is joined to a table called pipe_run (this table holds the details to some of the 'names') The names in the tag_reg have a one to many relation ship to rows in the pipe_run table.

The pipe run table is joined to a table called "nozzle". This tables holds to/from information about the rows in the pipe run table. The rows in the pipe_run table have a one to many relationship with the nozzle table

When this is run in a query, you get the example I was refering to earlier like so:

Tag_reg1 pipe_run1 nozzle1
Tag_reg1 pipe_run1 nozzle2
Tag_reg1 pipe_run2 nozzle1
Tag_reg1 pipe_run2 nozzle2
Tag_reg2 pipe_run1 nozzle1
Tag_reg2 pipe_run1 nozzle2
Tag_reg2 pipe_run2 nozzle1
Tag_reg2 pipe_run2 nozzle2

In the report I sort by tag_reg first, the by pipe run. But I found that doing so seems to "filter out" data from the nozzle table.

Is that better?

Sorry for the confusion.