Query to already include some data.

emihir0

New member
Local time
Tomorrow, 00:34
Joined
Apr 21, 2015
Messages
7
I have 3 queries which I need to combine in order to get the desired query.

1) Materials_Used
2) Products
3) Product_Operations

1) Materials_Used has the following fields:
- ID
- ID_Product
- ID_Product_Operations
- ID_Material
- Quantity
- Note

2) Products
- ID
- ID_Model
- Name
... other irrelevant fields

3) Product_Operations
- ID
- ID_Model
... other irrelevant fields

Now I have a form "Product Details" which has a subForm "Materials Used at Product" (MUaP).

When this form is opened, user needs to see only:

1) Materials_Used has the folling fields:
- ID (NO) - hidden auto-ID enumeration
- ID_Product (NO) - link onto main form (Product Details)
- ID_Product_Operations (Yes)
- ID_Material (YES)
- Quantity (YES)
- Note (YES)

The relationship between "Material_Used" and "Product Operations" is one-to-many.

The problem is that when the user creates a new Product, it uses some model which has a set of Product_Operations. Hence when subForm MUaP loads up, I want to show ALL pre-defined operations in order to "attach" the materials to them. Once it is done, the user can then add a new record to some given operation (from the comboBox "ID_Product_Operations") and attach additional material to it (ie. some operations can use more than 1 material).

Any general procedure on how this is done?

Thanks in advance,
emihir0
 

Users who are viewing this thread

Back
Top Bottom