Transfering info from table to table

Vonbare

Registered User.
Local time
Today, 13:18
Joined
Jun 29, 2005
Messages
16
Hi

I am creating a database but I am having a problem with one little bit (so far!!)

I have form (and table) 1 and form/table 2. When I am in table 1 (which is company details) I want to be able to click a button which will open form 2 and allow me to enter a new record of incoming mail details regarding the Co. selected in form 1.

I have made a relationship between the Company ID on both tables.

I cannot seem to work out how to make Access take the Co ID no from form/table 1 and stick it into form/table 2 when I push the button.

Can anyone offer any advice??

thanks heaps
Siobhan. :p
 
1. Do not open tables to do this. Open forms.

2. Use the form/sub-form (a.k.a. parent/child form) setup.

If you create a sub-form for your table 2 that holds the details specific to table 2 and uses the PK of table 1 to identify the records; and if table 1's key is a true candidate for prime-key status, you have a usable data setup.

Create the parent form that shows details of table 1 only. But add a big ol' chunk for the sub-form. Now insert the sub-form. If the sub-form wizard is enabled, it will ask you the field names to be used to link parent to child. As a side effect, if you then add a record through the sub-form, it automagically is properly linked.

Trying to do this independently through separate, unlinked forms, will only frustrate you to tears. Doing it through parent/child form setup is almost a piece of cake.
 

Users who are viewing this thread

Back
Top Bottom