D
dshemesh
Hello,
I have a project in which I encountered the following problem:
I have 4 tables: ReceiptsT (with a field RecieptId), MaterialsT (with a
field ReceiptId, MaterialId and Type2Id), MaterialType2T (with fields Type2Id
and Type1Id), and MaterialType1T (with filed Type1Id). The connection between
the tables is as follows:
Each record in the MaterialsT table has a receiptId field, which defines the
receipt which it belongs to (each receipt may have many materials connected
to it) and a Type2Id field which defines the type of the material. (A receord
in the MaterialsT table is used to describe a specific material received at a
specefic date from a specefic person).
In the MaterialType2T is the table which holds the different types of
materials (for example: organic solids, organic liquids etc.). Each record in
the MaterialType2T has a Type1Id field which defines the general type of the
Material (for example - organics). The Type1Id field is connected to the
MaterialType1T table which holds all the general types of materials.
I have a form which shows the different materials connected to a specific
receiptId.
The user chooses from a first form the ReceiptId he is interested in, and
then he is directed to a second form. The second form shows the different
records from the MaterialsT table which have the receiptId specified by the
user. I want this form to allow the user to change and add new Materials to
the receipt specified, and I also want it to continue showing all the
materials connected to the receipt chosen by the user.
The problem is the following:
I want the user to be able to first choose from a combo box the Type1Id
(which is NOT a field in the MaterialsT table), then I want him to choose the
Type2Id form a combo box which will show only the types of materials that are
connected to the Type1Id he has chosen. Later the user fills in the rest of
the fields necessary, and the table should be updated.
I tried using a query which has all the MaterialsT attributes, and Type1Id
from the MaterialType1Id, but this way, when the user finishes to add a new
record to the MaterialsT table, a new record is also automatically added to
the MaterialType1T table, which is unnecessary of course.
I have a project in which I encountered the following problem:
I have 4 tables: ReceiptsT (with a field RecieptId), MaterialsT (with a
field ReceiptId, MaterialId and Type2Id), MaterialType2T (with fields Type2Id
and Type1Id), and MaterialType1T (with filed Type1Id). The connection between
the tables is as follows:
Each record in the MaterialsT table has a receiptId field, which defines the
receipt which it belongs to (each receipt may have many materials connected
to it) and a Type2Id field which defines the type of the material. (A receord
in the MaterialsT table is used to describe a specific material received at a
specefic date from a specefic person).
In the MaterialType2T is the table which holds the different types of
materials (for example: organic solids, organic liquids etc.). Each record in
the MaterialType2T has a Type1Id field which defines the general type of the
Material (for example - organics). The Type1Id field is connected to the
MaterialType1T table which holds all the general types of materials.
I have a form which shows the different materials connected to a specific
receiptId.
The user chooses from a first form the ReceiptId he is interested in, and
then he is directed to a second form. The second form shows the different
records from the MaterialsT table which have the receiptId specified by the
user. I want this form to allow the user to change and add new Materials to
the receipt specified, and I also want it to continue showing all the
materials connected to the receipt chosen by the user.
The problem is the following:
I want the user to be able to first choose from a combo box the Type1Id
(which is NOT a field in the MaterialsT table), then I want him to choose the
Type2Id form a combo box which will show only the types of materials that are
connected to the Type1Id he has chosen. Later the user fills in the rest of
the fields necessary, and the table should be updated.
I tried using a query which has all the MaterialsT attributes, and Type1Id
from the MaterialType1Id, but this way, when the user finishes to add a new
record to the MaterialsT table, a new record is also automatically added to
the MaterialType1T table, which is unnecessary of course.