Duplicates in subforms

G

Guest

I have created a subform with tab controls from various tables. Two of the
tables are called Property and Tenant. In the Property Table I have the
primary key as the Property Ref and in the Tenant Table the primary key is
the Tenant Ref. This all works fine until I want to add more than one tenant
with the same Property Ref – it puts the property in twice therefore making
it look as if I have two properties with the same Property ref and address
and the same number of tenants. Can someone please help me and tell me where
I am going wrong?

Many thanks
 
S

Steve Schapel

Emc,

This means you have a one-to-many relationship between Property and
Tenant. So presumably you have a Property Ref field in the Tenant table
to identify which Property each Tenant occupied. Is that right? And
you will need to have your forms related in such a way that it reflects
this data relationship. I am not clear what you mean by "subform with
tab controls from various tables", but I guess I would imagine that the
Tenant form is a subform on the Property form... is that right? If so,
make sure that the Lonk Master Fields and Link Child Fields properties
of the Tenant subform is set to Property Ref, and if the Tenant subform
is in continuous view, you should then be able to enter more than one
tenant for the current property.
 
G

Guest

Steve you are absolutely right in everything you say. I have done what you
recommend and everything works. Genius.

Thank you very much.

emc
 

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