Valery
Registered User.
- Local time
- Yesterday, 16:06
- Joined
- Jun 22, 2013
- Messages
- 363
Hi all - not sure how to phrase my question and concern.
This is a COOP habitation and there x number of units. One or more tenants may live in a given unit. Tenants status are "members" (M) or "occupants" (O). All members are of equal rights and obligations...
Here are my two main tables - the heart of the database:
Table: tblUnits
UnitsID – primary key
UnitNum – number field
UnitType – number field (looks up a query)
Table: tblTenants
TenantsID – primary key
Unit_Num – number – link to tbl Units
FirstName, LastName, DOB… and so on
I link the tables by UnitNum and Unit_Num.
Problem: In a query, because there are several tenants to a given unit - therefore they have the same UnitNum, the recordset not updatable.
So what should I do or have done?
My logic was to have the Unit table contain information that pertains directly to the Unit itself i.e. status of the unit (clean, dirty...), number of appliances and types of appliance, flooring type and condition... and, already in there, the UnitType which contains information as to the number of bedrooms the unit contains and so on.
Before asking for my help, my brother-in-law had built a small database and had the tenants in separate fields vs records. So he had fields like member 1, member2, member3… Occupant1, Occupant2… with tenant's full name in the field. Of course, they rang in snags at some point where a unit had more people than anticipated by the database.
I get that doing this way is easier to produce labels for example, or have all the tenants in the salutation of a letter... but it is wrong. So it is not my solution.
Any suggestions how I should build this? And for my non-updatable query which also means non-updatable form?
Thank you!
Val
This is a COOP habitation and there x number of units. One or more tenants may live in a given unit. Tenants status are "members" (M) or "occupants" (O). All members are of equal rights and obligations...
Here are my two main tables - the heart of the database:
Table: tblUnits
UnitsID – primary key
UnitNum – number field
UnitType – number field (looks up a query)
Table: tblTenants
TenantsID – primary key
Unit_Num – number – link to tbl Units
FirstName, LastName, DOB… and so on
I link the tables by UnitNum and Unit_Num.
Problem: In a query, because there are several tenants to a given unit - therefore they have the same UnitNum, the recordset not updatable.
So what should I do or have done?
My logic was to have the Unit table contain information that pertains directly to the Unit itself i.e. status of the unit (clean, dirty...), number of appliances and types of appliance, flooring type and condition... and, already in there, the UnitType which contains information as to the number of bedrooms the unit contains and so on.
Before asking for my help, my brother-in-law had built a small database and had the tenants in separate fields vs records. So he had fields like member 1, member2, member3… Occupant1, Occupant2… with tenant's full name in the field. Of course, they rang in snags at some point where a unit had more people than anticipated by the database.
I get that doing this way is easier to produce labels for example, or have all the tenants in the salutation of a letter... but it is wrong. So it is not my solution.
Any suggestions how I should build this? And for my non-updatable query which also means non-updatable form?
Thank you!
Val