CREATE RECORD FROM MULTIPLE FORMS

M

Mackster66

Access 2003 mdb, not split...

I am trying to create a database that can track people and their
affiliations. The current problem I am having involves adding a new record
based on data from two different forms.

The first form [PERSONDETAIL] contains information about one person and is
based on several tables [PERSONS], [VEHICLES], [ADDRESSES], [ASSOCIATES],
etc. The main part of the form is based on an Sql statement from the
[PERSONS] table. There are several subforms based on Sql statements from the
other tables which are all linked by field.PERSONID.

In an effort to avoid duplication of data across tables, the [ASSOCIATES]
table only contains data to link [PERSONDETAIL] records to each other and
contains field.PERSONID1 and field.PERSONID2.

When a user adds a new associate to a person, I would like to check the
[PERSONS] table to see if they are already in the database or if a new record
needs to be created for the associate. On the PERSONDETAIL form, the
ASSOCIATEDETAILSUBFORM has a command button which prompts the user for a last
name and opens a list filtered by last name. If the name is on the list, the
user can click on the name to open the ASSOCIATEDETAIL form and verify that
it is the person they want to link.

Here is the problem. If it is the same person that they want to link as an
associate to the main person, I want to create a record in the [ASSOCIATES]
table that contains the PERSONID1 from the main person's form and PERSONID2
from the associate's form. If the person is not on the list, then I would
like for the user to be able to enter a new PERSONS record and link the new
record to the main person.

I am familiar with VBA but for the life of me, I can't get my brain around
this one.
 

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