AnsweredAssumed Answered

How to Auto populate Primary Key Into Foreign Key Field

Question asked by gjbrewer on Jun 26, 2013
Latest reply on Jun 26, 2013 by philmodjunk

Title

How to Auto populate Primary Key Into Foreign Key Field

Post

     My Database consists of two tables, the "Comany" table and the "Contacts" table. My first layout allows me to create a new company with the basic company information. I have then created a button and a portal that allows me to create a new contact record in the contact table from the company table. My problem is that each time I create a new contact I have to manually align the foriegn key value to the primary key value of the company that the contact will be assosiated with. How do I set this up so that when I create a new contact under a given company that the primary key for that company automatically poplulates the foriegn key field for that new contact?

                
               Preferences
§
1
2
3
4
5
6
7
8
9
0
-
=
Backspace
                     
Tab
q
w
e
r
t
y
u
i
o
p
[
]
                          
Return
                          
                     
capslock
a
s
d
f
g
h
j
k
l
;
'
\
                     
shift
`
z
x
c
v
b
n
m
,
.
/
shift
                     
                          
                         English
                               
                               
alt
alt
                     
                
               Preferences

     What I'd like to do is:

     Create a company, then create contacts for that company that automatically assosiate with that company and no other. Most cases I will have 6 or more contacts assosiated to each company.

     Thanks,

      

Screen_Shot_2013-06-26_at_10.36.05_AM.png

Outcomes