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
 
Joined
Jul 3, 2008
Messages
407
Reaction score
0
Firstly hi,

All you need to do is use sub-forms :p
Failing that you can hardcode it using VBScript.
 
Joined
Jul 3, 2008
Messages
407
Reaction score
0
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Multiple values in form field 2
Access Daily Entry with multiple entries per field 0
Help With MS Access 4
Access MS ACCESS Clear original values on Click 0
Access Validation rule in MS access 2010 1
Access MS Access VB 0
Access MS Access Listbox not saving to bound field 0
Access Dcount (multiple criteria) 3

Top