Value from one table into another

patnick

New member
Local time
Today, 14:43
Joined
Oct 9, 2008
Messages
8
Hi folks,

My problem:
Table1: with 1 column of names.
I created a Form with a ComboBox to select one of these names from the Table.

Now I want to use the selected name in a new table (Table2).
How do I have to make the link that this name apperas in the second table?

Many thanks for your help in advance!
Patnick
 
It is not the name that you want to appear in the second table it is the Id if the person you want to append. Why? Let's say Jane Smith is picked from the list and you append "Jane Smith" to the second table. Jane then gets married and becomes Jane Brown, you link between the two table will be broken. however if Jane's PK is say 100 and then second table has 100 as its foreign key linked to the Primary key in table one then any changes in table one will be casecaded through to table two.


Lecture over, run an append query to add the new record to the table.
 
Many thanks DCrake,

but I still have the problem that table2 doesn't receive the information from the combo box:

I am working now just with numbers in table1
Then I created the relationship between table1 (OrderNumber) and
the blank table2 where the information should be stored.

By selecting ONE number - from a created combo box in a form - this number will not get stored in table2 automatically.
Table2 doesn't know to retreive the selected data from the combo box and I don't know how to insert this process.
 
If you wish to append the names to an existing table you could craft an SQL "Insert Into" statement and then execute it using DAO.
 

Users who are viewing this thread

Back
Top Bottom