Interogative form

C

CAD Fiend

Hello,

I am building a land parcel database that will have 4 or 5 tabbed forms.
One of the tabs will be the "Parcel Info" record, which in most cases is
two people (husband and wife). But sometimes there are as many as 4
co-owners. I have already built the fields to accommodate up to 4
co-owners. The fields are named, Owner_1, Owner_2, etc.

Is there a way that I can set it up so that when the user clicks on the
tabbed form named "Parcel Info", the action (click) will cause the form
user to be asked "How many parcel owner fields will you need in your
form?" And the user can select from 1 to 4 owners. And the form will
generate the appropriate amount of fields based on the users response.

TIA.

Phil.
 
R

Rick B

That is not "normalized" database design. If you have a variable number of
owners, then they should be in a separate table. The table would contain
the key that relates back to your main table (parcelnumber maybe?) and then
fields for the name and other info. If there is one owner, you'd have one
entry in this table. If you have ten owners, you'd have ten records.

This is a classic ONE-TO- MANY relationship.
 
C

CAD Fiend

Rick,

Good point. But the problem is I'm using the "Parcel_Id" as the PK in the Table
1.You can have many owners to one parcel.

I guess I should just make a second table (Table 2) with just the owner's first
and last names as the PK (first column) and "Parcel_ID" as the second column
(which is the PK of table 1).

Then Table 1 will have the owner's names as the FK in the second column and
"Parcel_ID" as the PK in the first column.

BTW, how do I merge the two fields "First_Name" and "Last_Name" together to
make them as one field that I mentioned earlier? Is that done in the query?

Thanks.
 
R

RuralGuy

CAD Fiend said:
Rick,

Good point. But the problem is I'm using the "Parcel_Id" as the PK in
the Table 1.You can have many owners to one parcel.

I guess I should just make a second table (Table 2) with just the
owner's first and last names as the PK (first column) and "Parcel_ID"
as the second column (which is the PK of table 1).

Then Table 1 will have the owner's names as the FK in the second
column and "Parcel_ID" as the PK in the first column.

BTW, how do I merge the two fields "First_Name" and "Last_Name"
together to make them as one field that I mentioned earlier? Is that
done in the query?

Thanks.

I'm sure Rick will get back to you, but in case it takes a while I'm sure
Rick will agree that Names are a lousy key, PK or FK. What if they get
married, divorced etc.

Just use an AutoNumber field as a PK and the Parcel_ID field from Table
as the Foreign Key.

You can easily put the First and Last name together in a Query:
FullName: = [First_Name] & " " & [Last_Name]

Hope that helps!
 
C

CAD Fiend

RuralGuy said:
I'm sure Rick will get back to you, but in case it takes a while I'm sure
Rick will agree that Names are a lousy key, PK or FK. What if they get
married, divorced etc.

Just use an AutoNumber field as a PK and the Parcel_ID field from Table
as the Foreign Key.

Thanks, that's exactly what I did do!
You can easily put the First and Last name together in a Query:
FullName: = [First_Name] & " " & [Last_Name]

Hope that helps!
 

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