G
Georg
I have a table ("productservice") that is set up to contain products and
services. There is a productid and a serviceid field. When a row contains a
product, the productid field contains an integer value and the serviceid
field is NULL. The opposite applies for a service.
The "productservice" table is linked to a parent table ("treatment") linked
by "treatmentid" which is part of the primary key in the "productservice"
table. A treatment can have several products and services.
I have a form for treatments with two embedded subforms, one for products,
the other for services. The subforms are correctly linked to the parent form
via the "treatmentid" (entry of "treatmentid" in subforms' "Link Child
Fields" and "Link Master Fields" properties).
The "Record Source" property for the products subform is set to
SELECT productservice.*, productid FROM productservice WHERE
((productservice.productid) Is Not Null);
and analogously for the services subform.
For some reason the records are not showing properly when browsing.
The products appear correctly in the products subform.
However, for a treatment that has both products and services associated with
it, the services subform shows the first product as it appears in the
products subform. Strangely enough, the count of services associated with a
treatment is always correct.
When a treatment has only products associated with it, the services subform
is correctly showing no entries.
I also noticed that right after opening the treatment form and going to the
second product, it shows the same product as the first. When I advance to the
second treatment and come back to first (that the form opened to) and then go
from the first to the second product, I see the second product correctly.
Can someone enlighten me as to what is going on here and what I am doing
wrong?
Georg
services. There is a productid and a serviceid field. When a row contains a
product, the productid field contains an integer value and the serviceid
field is NULL. The opposite applies for a service.
The "productservice" table is linked to a parent table ("treatment") linked
by "treatmentid" which is part of the primary key in the "productservice"
table. A treatment can have several products and services.
I have a form for treatments with two embedded subforms, one for products,
the other for services. The subforms are correctly linked to the parent form
via the "treatmentid" (entry of "treatmentid" in subforms' "Link Child
Fields" and "Link Master Fields" properties).
The "Record Source" property for the products subform is set to
SELECT productservice.*, productid FROM productservice WHERE
((productservice.productid) Is Not Null);
and analogously for the services subform.
For some reason the records are not showing properly when browsing.
The products appear correctly in the products subform.
However, for a treatment that has both products and services associated with
it, the services subform shows the first product as it appears in the
products subform. Strangely enough, the count of services associated with a
treatment is always correct.
When a treatment has only products associated with it, the services subform
is correctly showing no entries.
I also noticed that right after opening the treatment form and going to the
second product, it shows the same product as the first. When I advance to the
second treatment and come back to first (that the form opened to) and then go
from the first to the second product, I see the second product correctly.
Can someone enlighten me as to what is going on here and what I am doing
wrong?
Georg