Access Enter multiple values for field in MS Access

Joined
Jan 7, 2009
Messages
2
Reaction score
0
I have 2 tables in a one to many relationship. I have created an input form but at this point I have to use a new form for every value in the "many" table related to the value in the "one" table. I'd like to be able to enter multiple values on one form. the form would need to have the ability to create new records in the "many" table based on the input to the form. something like "Do you wish to enter another record" for a given field. Ie., table "One" is "Mom". Table "many" is "Children" - a mom can have many children. I'd like the input to gather all the information it needs for the "Mom" table and in the "Children" field be able to add "John", "Susan", "Mary".

Can anyone tell me how to do this?

Cathy
 
Firstly hi,

All you need to do is use sub-forms :p
Failing that you can hardcode it using VBScript.
 
Hard code example in psuedo code

Example input
mum=tania
children= james, ashley, miles

get PK for tania
create record in children table
child = james, FK = (PKr from mum), PK = autonumber
create record in children table
child = ashley, FK = (PK from mum), PK = autonumber
create record in children table
child = miles, FK = (PK from mum), PK = autonumber

You must fully undertand table relationships to create your references otherwise it will go wrong.
 
Back
Top