Creating A Lookup Column That contains the Foreign ID to a ParentTable

  • Thread starter nouveauricheinvestments
  • Start date
N

nouveauricheinvestments

Hi,

I just created a relationship between a parent table, called 'Trade
Specialists', and a child table, called 'Tickets'. This is a one to
many relationship. In my parent table, Trade Specialists, I have to
fields:

Resolved By
ID

In my Tickets table, I have a column that lists the Trade Specialist
who resolved the ticket and then I have another column which I have
added and related to the parent table[Trade Specialists] (I think my
error may lie somewhere here, but I cannot relate two fields of a
different data type, so the only thing I could think to do was add a
new field).

I then used for the lookup row source SQL statement the following:

SELECT [Trade Specialists].[ID] AS xyz_ID_zyx, [Trade Specialists].
[ID] AS xyz_DispExpr_xyz, [Trade Specialists].[Resolved By]
FROM [Trade Specialists]
ORDER BY [Trade Specialists].[Resolved By];

What am I doing wrong?
 
L

Lord Kelvan

well first of all you are using a look up column.

use a form/subform to do data entry not the back end.

look up fields are the spawn of the devil in the words of the mpvs

Thou shalt never allow thy users to see or edit tables directly, but
only through forms and thou shalt abhor the use of "Lookup Fields"
which art the creation of the Evil One.

(yes they have too much time on their hands)

hope this helps

Regards
Kelvan
 
R

R Tanner

well first of all you are using a look up column.

use a form/subform to do data entry not the back end.

look up fields are the spawn of the devil in the words of the mpvs

Thou shalt never allow thy users to see or edit tables directly, but
only through forms and thou shalt abhor the use of "Lookup Fields"
which art the creation of the Evil One.

(yes they have too much time on their hands)

hope this helps

Regards
Kelvan

Well I haven't gotten to the point where I want to let the end user do
anything yet...I am still trying to get my tables organized. I
imported the data into Access and now I am trying to normalize
it...The database engine couldn't handle the way I was splitting up
the table for one reason or another, so I am trying to do it
manually...I can figure out easily enough how to create the
relationship, but I can't figure out how to actually place the foreign
key in the child table..
 
R

R Tanner

Well I haven't gotten to the point where I want to let the end user do
anything yet...I am still trying to get my tables organized.  I
imported the data into Access and now I am trying to normalize
it...The database engine couldn't handle the way I was splitting up
the table for one reason or another, so I am trying to do it
manually...I can figure out easily enough how to create the
relationship, but I can't figure out how to actually place the foreign
key in the child table..- Hide quoted text -

- Show quoted text -

This is the statement I am using in my Row Source field in SQL view.
I am simply modifying the automatically generated statement from
another table that was split using the table analyzer.

SELECT Trade_Specialists.ID AS xyz_ID_xyz, Trade_Specialists.ID AS
xyz_DispExpr_xyz, [Resolved By] FROM Trade_Specialists ORDER BY
[Resolved By];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top