Use a form to add samples to 1 project

Sniperbooya

Registered User.
Local time
Today, 18:18
Joined
Jan 30, 2015
Messages
16
It has been a while since I did anything with Access and i have been asked to create a new database using Access 2010.

At this point i have only got 2 tables;

- tbl_Contact
- tbl_Laboratory

Tbl_Contact contains projectinformation and tbl_Laboratory contains sample information.

I have created a form which allows the user to create projects.
But now i want to create a form which allows the user to create samples and assign them to a projectnumber.

However, i do not want to assign them individually, i would like to select the projectnumber just once and then use that for all the samples as long as i have the form active.

I have tried to use VBA variables but for some off reason nothing seems to work.

Any ideas on how to do this?
 
tbl_Contact should have a primary key (use ID, numeric long, autonumber).
tbl_Laboratory should have foreign key (tblContactID, numeric long).
make a relation between tbl_Contact and tbl_Laboratory between these fields.

create a form (tbl_contact as the record source).
insert a subform (tbl_laboratory as the record source).

on the subform property->data:
Link master fields: ID
Link child fields: tblContactID
 
Thanks arnelgp.

That worked like a charm!.
 

Users who are viewing this thread

Back
Top Bottom