Hello all,
A small introduction first. I am a computerscience student, currently working as an intern at a brewery. My task is to add functions to an existing database, and "optimise" it where a I can. The database contains information about dangerous products stored at the company. Think about details about the storage locations, supplier details, safety measures etc.
Two problems first:
One the problems is that the database is made by a guy who was very inconsistent regarding the naming of things. For example, "Product Form2" and "Product2 Form" are two different forms.
Second problem is that I (currently) cant edit or change table structures and names, because the database is already in use and I`ll have to convert the up-to-date data into the "optimised" database.
Now on to the problem im working on. Currently, if someone adds a product, you have to choose the place of storage through a combobox. But if the product is stored at more then one location, you`ll have to add a record with the same product details, but with a different location.
To solve this, My idea was to add a subform that allows you to select multiple locations with comboboxes.
Because the database is already in use, I want to subform to read out the "Product" table for the locationnames. In the case of multiple locations, I want both views to show them. In the case of the following example, I want to see the subform showing both locations on both product views:
"poison" is stored at the "warehouse"
"poison" is stored at the "basement"
My idea was that this data gets written to a table called "ProductPerLocation". Locationnames are stored in "LocationName", and product details in "Product". Im a bit at a loss now regarding making the subform. It needs to read out the names from "LocationName" so I can add locations for that product, and the locationnames that the product is stored at from the "Products" table, so it automatically sets those.
English isnt my native language so if something is a bit vague, I`ll try my best to elaborate on it. If someone can help me with this I'll be a very happy guy, since similar subforms are needed for other items.
Thanks in advance!
A small introduction first. I am a computerscience student, currently working as an intern at a brewery. My task is to add functions to an existing database, and "optimise" it where a I can. The database contains information about dangerous products stored at the company. Think about details about the storage locations, supplier details, safety measures etc.
Two problems first:
One the problems is that the database is made by a guy who was very inconsistent regarding the naming of things. For example, "Product Form2" and "Product2 Form" are two different forms.
Second problem is that I (currently) cant edit or change table structures and names, because the database is already in use and I`ll have to convert the up-to-date data into the "optimised" database.
Now on to the problem im working on. Currently, if someone adds a product, you have to choose the place of storage through a combobox. But if the product is stored at more then one location, you`ll have to add a record with the same product details, but with a different location.
To solve this, My idea was to add a subform that allows you to select multiple locations with comboboxes.
Because the database is already in use, I want to subform to read out the "Product" table for the locationnames. In the case of multiple locations, I want both views to show them. In the case of the following example, I want to see the subform showing both locations on both product views:
"poison" is stored at the "warehouse"
"poison" is stored at the "basement"
My idea was that this data gets written to a table called "ProductPerLocation". Locationnames are stored in "LocationName", and product details in "Product". Im a bit at a loss now regarding making the subform. It needs to read out the names from "LocationName" so I can add locations for that product, and the locationnames that the product is stored at from the "Products" table, so it automatically sets those.
English isnt my native language so if something is a bit vague, I`ll try my best to elaborate on it. If someone can help me with this I'll be a very happy guy, since similar subforms are needed for other items.
Thanks in advance!