Combining tables

  • Thread starter Thread starter David
  • Start date Start date
D

David

I'm trying to combine the records of two fields in the
same table into one. Is this possible?

Thanks
 
I'm trying to combine the records of two fields in the
same table into one. Is this possible?

The "records" of two fields? Records CONSIST of fields - each row of a
Datasheet is a record, each column is a field.

Please describe what you're trying to accomplish in more detail,
perhaps with an example.
 
I have 2 fields, [Father's ID] and [Mother's ID]. I would
like to combine the contents of these two fields to make
a lookup field called [Parents' ID].
 
I have 2 fields, [Father's ID] and [Mother's ID]. I would
like to combine the contents of these two fields to make
a lookup field called [Parents' ID].

Ummm...

No. You DON'T want to do this. In fact it makes no sense; if the
Father's ID is 318, and the Mother's ID is 231, what does it mean to
"combine" them? What would you want to "look up" if you selected
Parent's ID?

Step back a bit. Lookup Fields in tables are a VERY limited and even
more confusing misfeature, in my opinion; I've grudgingly admitted
that folks like John Viescas (who's published several excellent books
on Access) should feel free to use them, but I try to discourage
people just getting acquainted with Access from ever using them at
ALL.

What are you trying to ACCOMPLISH, from the user point of view? What
do you want to see on the screen, and be able to do?
 
I guess I'm not being too clear. Sorry for the
inconvenience.

I have a list of father IDs (eg. 111, , 333, 555) and
mother IDs (eg. 222, 444, 666) and I want to make a
bigger list (eg. 111, 222, 333, 444...) and not just
[Parents]=[Mother's ID]+[Father's ID].

The result for the end user is that they would, when
inserting statistics on each parent (another table), be
able to choose from a big combo box list of parents. I
hope that I'm not forgetting anything.

Thanks
-----Original Message-----
I have 2 fields, [Father's ID] and [Mother's ID]. I would
like to combine the contents of these two fields to make
a lookup field called [Parents' ID].

Ummm...

No. You DON'T want to do this. In fact it makes no sense; if the
Father's ID is 318, and the Mother's ID is 231, what does it mean to
"combine" them? What would you want to "look up" if you selected
Parent's ID?

Step back a bit. Lookup Fields in tables are a VERY limited and even
more confusing misfeature, in my opinion; I've grudgingly admitted
that folks like John Viescas (who's published several excellent books
on Access) should feel free to use them, but I try to discourage
people just getting acquainted with Access from ever using them at
ALL.

What are you trying to ACCOMPLISH, from the user point of view? What
do you want to see on the screen, and be able to do?



.
 
I guess I'm not being too clear. Sorry for the
inconvenience.

I have a list of father IDs (eg. 111, , 333, 555) and
mother IDs (eg. 222, 444, 666) and I want to make a
bigger list (eg. 111, 222, 333, 444...) and not just
[Parents]=[Mother's ID]+[Father's ID].

ok! Thanks, that is indeed clearer.

For this you need what's called a UNION query: qryParents. To create
it you need to use the SQL window, not the query grid; it will be
something like

SELECT FatherID AS ParentID FROM yourtable
UNION
SELECT MotherID FROM yourtable
ORDER BY ParentID;

This will give you a long list of all the parent id's.
 
Back
Top