Forms with Multi-subforms

  • Thread starter Thread starter Joan
  • Start date Start date
J

Joan

I have 3 forms, they are A, B, and C. A to B is a one-to-
many relationship and B to C is a one-to-one.

So when I select a record on form A, it is suppose to
bring up the corresponding information in form B, which
brings up the corresponding information in form C. Which
it does correctly.

However, when I go to update the information in form B, it
will not let me update the information in form C. It says
there is some sort of automation error. What am I doing
wrong or need to change???
 
Joan,

No answers, I'm afraid, just a few questions... you really haven't given
enough information for anyone to know what you are doing. Do you mean
that you have Form B and Form C both set up as subforms on Form A? What
are entered for the Link Master Fields and Link Child Fields properties
of the subforms? Are Form B and Form C both based on the same table?
If not, why not, since there is a one-to-one relationship? What field
is at the basis of the relationship between Form B and Form C?
 
I have my three forms set up like this. Form C is a
subform of Form B which is a subform of Form A. The
common field is Customer_ID. Form A brings up the
Customer_ID and Customer Name. Form B has all the systems
relating to each customer. Form C has all the information
for one system. There are multiple records of systems per
customer, but only one record of information per system.

So Form A and Form B both have a field Customer_ID and
that is how they are linked.

Form B and form C both have a field System_ID and that is
how they are linked. Form C has a Customer_ID field, also.

Form A is based on the Customer Information Table. Form B
is based on a Systems table. Form C is based on the
System Information table. Each table is related through
the Customer_ID and/or the System_ID.

What I want to happen is the following:

I want to select the Customer on Form A, then be able to
add/edit/delete systems under each customer on Form B.
Depending on what action I performed on Form B, I want to
be able to add/edit/delete the corresponding information
on Form C.

As of right now, my forms will allow me to add/edit/delete
systems on Form B, but when I go to make changes to form
C, I get an automation error and am unable to save changes
made to information on Form C. What am I doing wrong? Am
I attempting to do the impossible?????
 
Joan,

What you are trying to do is not exactly impoossible. But your database
design would generally be regarded as invalid, and is making your life
unnecessarily complicated. You should combine the Systems table and the
System Information table into one table. You can still have the three
form setup if necessary, although I see no reason for it, and I would
strongly recommend you just have the single subform, based on the
combined tables B/C. Please let me know if this will not work for you.
 
It worked perfectly!!! Thanks for your help!!
-----Original Message-----
Joan,

What you are trying to do is not exactly impoossible. But your database
design would generally be regarded as invalid, and is making your life
unnecessarily complicated. You should combine the Systems table and the
System Information table into one table. You can still have the three
form setup if necessary, although I see no reason for it, and I would
strongly recommend you just have the single subform, based on the
combined tables B/C. Please let me know if this will not work for you.

--
Steve Schapel, Microsoft Access MVP


.
 
Back
Top