Send Value to Tables

  • Thread starter Scott_66701 via AccessMonster.com
  • Start date
S

Scott_66701 via AccessMonster.com

How do you go about placing the Primary Key in all your tables without
manually typing them in?

I have my primary table which is called "Crew".

One of my other tables name is "Outcome"

My primary key, which is located in the crew table is named "RunNo" If
someone can explain how to get the value (numeric) to appear in the Outcome
table, I can do the same to get it to appear in the other tables as well.

I don't know if I need to use DLOOKUP or what. I have seen loads of examples
for DLookup and can't get it to work right so I dunno. I would appreciate
any suggestions you might have.

Thank you

Scott
 
M

Mike Painter

Scott_66701 via AccessMonster.com said:
How do you go about placing the Primary Key in all your tables without
manually typing them in?

I have my primary table which is called "Crew".

One of my other tables name is "Outcome"

My primary key, which is located in the crew table is named "RunNo"
If someone can explain how to get the value (numeric) to appear in
the Outcome table, I can do the same to get it to appear in the other
tables as well.

I don't know if I need to use DLOOKUP or what. I have seen loads of
examples for DLookup and can't get it to work right so I dunno. I
would appreciate any suggestions you might have.

Thank you

Scott

A table has or should have a primary key.
You want to put the key from "Crew" into "Outcome", not as a primary key but
as a foreign key.

A properly designed form will do this automatically if a query is used.
If a form and subform are used Access will do most of the work for you.

DLookup is a great tool but there is rarely a need for it.
 
J

John W. Vinson

How do you go about placing the Primary Key in all your tables without
manually typing them in?

I have my primary table which is called "Crew".

One of my other tables name is "Outcome"

My primary key, which is located in the crew table is named "RunNo" If
someone can explain how to get the value (numeric) to appear in the Outcome
table, I can do the same to get it to appear in the other tables as well.

I don't know if I need to use DLOOKUP or what. I have seen loads of examples
for DLookup and can't get it to work right so I dunno. I would appreciate
any suggestions you might have.

Thank you

Scott

If the Crew table is related one-to-many to the Outcome table, the simplest
way is to use a Form based on Crew, with a Subform based on Outcome. Use RunNo
as the master/child link field.

If you have a one to one relationship - why? Why not simply include the
outcome fields in the crew table?

In any case it is NOT necessary to pre-fill the Outcome table with
"placeholder" records containing only the RunNo field. Such records are of no
use whatsoever, and have a terrible way of never getting filled in.
 
S

Scott_66701 via AccessMonster.com

Mike,

Thanks for the input. I have no experience with queries though. Can you
give an example of how you would program a query to do that.

Mike said:
How do you go about placing the Primary Key in all your tables without
manually typing them in?
[quoted text clipped - 15 lines]

A table has or should have a primary key.
You want to put the key from "Crew" into "Outcome", not as a primary key but
as a foreign key.

A properly designed form will do this automatically if a query is used.
If a form and subform are used Access will do most of the work for you.

DLookup is a great tool but there is rarely a need for it.
 
M

Mike Painter

Help has a ton of information on queries, both what they do and how to
create one using the query builder.
There are also examples in the Northwind Database which cover the more
common uses.
Scott_66701 via AccessMonster.com said:
Mike,

Thanks for the input. I have no experience with queries though. Can
you give an example of how you would program a query to do that.

Mike said:
How do you go about placing the Primary Key in all your tables
without manually typing them in?
[quoted text clipped - 15 lines]

A table has or should have a primary key.
You want to put the key from "Crew" into "Outcome", not as a primary
key but as a foreign key.

A properly designed form will do this automatically if a query is
used.
If a form and subform are used Access will do most of the work for
you.

DLookup is a great tool but there is rarely a need for it.
 
Top