Problem Query

  • Thread starter Thread starter Nickie
  • Start date Start date
N

Nickie

I have two tables one contains letters in and the other letters out.

I want to be able to run two queries one that will show all outgoing letters
that relate to each incomming letter and one that will show all incomming
letters that relate to each outgoing letter.

Any possible solutions would be much appreciated as I am not quite sure of
the best way.
 
Nickie

Why? Why have two tables? If the only difference between the two tables is
that one is for "out" and the other for "in", use a single table with one
added field to show whether the record is "out" or "in".

Then, if you need to relate one to another, add one more field that holds
the record ID of the record to which it is related.

Now, if you could have one "in" and many related "out" records, you need a
different structure.

"How" depends on "what" -- please describe your situation in more detail...

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
From my vantage point, you have nothing that relates any in or out letter to
any other in or out letter so this is impossible.

If there is something that creates a relationship, it would help if you told
us.
 
I can't have one table as the letter numbers in each log are generated
through an auto number field to minimise duplications.

I overall want to be able find a letter in the incomming log and see all
related in and out letters and vice versa.


--
Regards

Nickie


Jeff Boyce said:
Nickie

Why? Why have two tables? If the only difference between the two tables is
that one is for "out" and the other for "in", use a single table with one
added field to show whether the record is "out" or "in".

Then, if you need to relate one to another, add one more field that holds
the record ID of the record to which it is related.

Now, if you could have one "in" and many related "out" records, you need a
different structure.

"How" depends on "what" -- please describe your situation in more detail...

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
I have two tables one contains letters in and the other letters out.

I want to be able to run two queries one that will show all outgoing letters
that relate to each incomming letter and one that will show all incomming
letters that relate to each outgoing letter.

Any possible solutions would be much appreciated as I am not quite sure of
the best way.

As Jeff and Duane say, this may not be an ideal design. What information in an
"in" record lets you identify which "out" record it is "related to"? I take it
that one "in" letter be related to several "out" letters, and vice versa?
Nothing you've posted indicates HOW they are related; can you help us here?
 
Back
Top