Problem with Subform Not Saving

G

Guest

I have a main form (ME-SLB05) which is a new address entry form and a subform
(ME-SLB05a) to enter the owners name, if it is known. Most times, it is not
so it is just going to be populated with 'unknown'. As the Owners can be
multiple, there is an autonumber field on the OwnerID field.

When a new record is added to the main form, it appears that the subform
should be saving the data but it's not and the table for that specific record
is empty. Can anyone advise what the error is that it's not properly saving.
Should there be an 'insert record' or something.

Thanks,
IEJ
 
B

BruceM

Whether or not there can be multiple owners is irrelevant to the fact that
OwnerID is autonumber. Autonumber is just a way of creating a unique
identifier for each record, but other ways of doing so would work just as
well. However, that there can be multiple owners is relevant to the
relationship between the tables.
Your Address table (tblAddress) needs a primary key field (AddressID). It
could be autonumber, or any unique identifier. tblOwners needs a primary
key field (OwnerID, which you already have) and a foreign key field
(AddressID). If AddressID in tblAddress is Autonumber, AddressID in
tblOwners needs to be of data type Number (set this in table design view).
Long Integer is a good choice. Create a relationship between AddressID in
the two tables (use Tools > Relationships; see Help for more information),
and check the box for Enforce Referential Integrity. If it will not let you
do so, delete the records in tblOwners (or create a new table and use that
for the relationship).
Set the default view of the subform to Continuous if you want to see several
Owner records at the same time.
 

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