HELP! Automatic entry for foriegn key

D

Debbie

I have a Table for APPLICANT and one for CHILD. The Primary key is
Applicants SS#. How can I have the Child Acct# automatically enter
the Applicants SS#, plus -01 for the first child, and -02 for the
second child, etc. I have the forms setup, APPLICANT is the Main Form,
Child is the Subform. I want the Child Acct# to be entered
automatically once I enter the childs name in the subform. Is this
possible? HELP
 
G

Guest

Set a one-to-many relationship between the applicant table primary key field
(SS#) and children table foreign key field. Set referential integerity and
cascade update. Use a separate text field for the -01 with a default of -01.

Link the main/subform Master/Child using SS# fields.

If you want then you can have a query or code to increment the child field
when a new record is added for that SS#.
 
D

Debbie

That sounds good. I dont have time to try it right now but I will
definitely play tomorrow. Hope you will still be around in case I have
a question. Thank you in advance.
 
D

Debbie

Okay, that worked great.

Now the query, I am not quit sure how to do this. Tell me the purpose
of the query? I am just starting with codes, I understand Macros more
than VBA.

Then, Let's make the CHILD table the Main Form, I want to link this
Child Acct# that was just created (111-11-1111-01 (ApplicantID-SS# plus
ChildExt-0#) to many subforms, such as physical, contract, etc. Can
this be done? If not, what is your suggestion.
 

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

Top