P
Peter
I have a contacts database developed in Access 2002 with a one to many
relationship between a main contacts table and a another table containing
service records. These tables are conatined in a back-end data base. A
simplified overview of the tables:
CONTACTS
Contact_ID (PK)
Category Code
name
address
SERVICEDETAILS (can have one or more entries per contact)
Contact_ID (FK)
start-date
end-date
The service details table is only populated with records relating to
contacts from the main table that have a specific category code (say code X).
I can open the main contacts table in data sheet view then clicking on the +
sign for a row I can select a sub-data sheet corresponding to the "many"
service details table and can display the records from this table and even
add new records. I can also filter the contacts table records to only
display those relating to category code X and still add records to the
sub-data sheet.
I am trying to achieve the above via a form which contains the main contact
details with an embedded sub-form to display the "many" service details. The
sub-form has had the correct master-child links established. The main form
has as its record source a query which includes all the main fields from the
contacts table but filtered to only include the records relating to Category
X as indicated above.
The form will display the contact records required and the corresponding
service records in the sub-form for the Contact_Id being displayed but on
attempting to add new records in the sub-form I received the following error
message:
"The linkmasterfields property setting has produced this error: the object
doesn't contain the automation object tblContacts".
Other messages are also displayed- "you cannot add or change a record
because a related record is required in table 'tblContacts' "
I cannot see what I have done wrong to cause this. I have a previously
developed database that uses similar methodology with forms and sub-forms
which works fine. There is no macro or VBA code associated with the above
form at this stage, this will be completed later as I need to include some
event procedures. I have checked the table relationships carefully,
including various combinations of join properties but still receive the error.
Anyone that has had similar problems and has been able to resolve these
please advise what I need to do to fix the problem.
relationship between a main contacts table and a another table containing
service records. These tables are conatined in a back-end data base. A
simplified overview of the tables:
CONTACTS
Contact_ID (PK)
Category Code
name
address
SERVICEDETAILS (can have one or more entries per contact)
Contact_ID (FK)
start-date
end-date
The service details table is only populated with records relating to
contacts from the main table that have a specific category code (say code X).
I can open the main contacts table in data sheet view then clicking on the +
sign for a row I can select a sub-data sheet corresponding to the "many"
service details table and can display the records from this table and even
add new records. I can also filter the contacts table records to only
display those relating to category code X and still add records to the
sub-data sheet.
I am trying to achieve the above via a form which contains the main contact
details with an embedded sub-form to display the "many" service details. The
sub-form has had the correct master-child links established. The main form
has as its record source a query which includes all the main fields from the
contacts table but filtered to only include the records relating to Category
X as indicated above.
The form will display the contact records required and the corresponding
service records in the sub-form for the Contact_Id being displayed but on
attempting to add new records in the sub-form I received the following error
message:
"The linkmasterfields property setting has produced this error: the object
doesn't contain the automation object tblContacts".
Other messages are also displayed- "you cannot add or change a record
because a related record is required in table 'tblContacts' "
I cannot see what I have done wrong to cause this. I have a previously
developed database that uses similar methodology with forms and sub-forms
which works fine. There is no macro or VBA code associated with the above
form at this stage, this will be completed later as I need to include some
event procedures. I have checked the table relationships carefully,
including various combinations of join properties but still receive the error.
Anyone that has had similar problems and has been able to resolve these
please advise what I need to do to fix the problem.