Re: Coping with Ingredients

From: Howard Pohl <hpohl2001_at_attbi.com>
Date: Thu, 13 Jun 2002 02:41:42 GMT
Message-ID: <GDTN8.20496$R61.938_at_rwcrnsc52.ops.asp.att.net>


Best of luck to you Graham. The solution you want to provide your user has to take in
a seemingly infinite number of variables. I look forward to hearing what your final solution is.

What I had described was only an outline, the example of making the additive 'family' user friendly
highlights this well. The next two questions you raise are also a good examples of how
you would have to expand to meet your needs as well.

The dialog box would not be a bound form but I could see it containing two subforms and controls
that would you to add/delete any number of additives, one subform would represent the list of
products that could be added and the other representing the base product and list of additives you
need to add to the ingredients table for a particular job. If you need to add the ability to adjust the
apprate I would include a recursive key in the ingredients table and a routine that stepped through
the ingredients to make adjustments based on changes you make to the base ingredient. Then again
the example you gave with the resin and the sand highlights the fact that you will need to make provisions
for those cases where the addition of additives will dictate the 'overall' apprate.

Once again, best of luck in creating a system that meets your user's needs.

Howard

"Graham Bellamy" <dontwriteme_at_ask.first.com> wrote in message news:ae8gv5$5uj$1_at_perki.connect.com.au...
> Thanks Howard,
> I'm going to have to have a think about how the additive 'family' numbers
can be presented
> to the user when they add a new Material. I think I'll need a table of
family numbers and
> their descriptions.
>
> What happens when the ingredient needs two additives? Would the dialog box
have to be a
> continuous form (based on a temp table??) to allow multiple additive
records?
>
> If the user later changes a base-product ingredient AppRate value, I would
need to update
> all additive rates. It wouldn't be good practice to ask the user to input
the percentages
> again. So I would have to store the base-product ingredient's old AppRate
value, then
> calculate what percentages the additives came from, then re-calculate the
additives'
> AppRates and update them.
>
> Whew! Does this sound right to you? I hope I'm on the right track.
>
> BTW. I know that in at least one case, the user would receive his
information (from the
> supplier) like this:
> This product should be mixed with sand in the ratio of 1 part resin to 3
parts sand. This
> will spread at a rate of 3.8 kg per square meter.
> The sand itself should be a mix of 3 different grades (say grade A, B & C)
in the ratio
> 1:2:2 (A:B:C)
>
> I think this is equivalent to a resin:sandA:sandB:sandC mix of 1 : 0.6 :
1.2 : 1.2
> I think what I will have to get the user to do is divide (in this case)
3.8 by 4 (1 resin
> to 3 sand) to give the AppRate of the resin first. Then the additive rates
can be entered
> as 0.6, 1.2 etc
>
> Since I don't know how many different ways the suppliers give mixing
instructions, I
> unfortunately would have to require the user to first gather the
information in the
> appropriate format. (Albert D. Kallal would probably have my guts for
garters for saying
> that <g> --- only kidding Mr. K... only kidding).
>
> Thank you very much, Howard. I appreciate it.
>
> Are there any other good ideas floating around??
>
> "Howard Pohl" <hpohl2001_at_attbi.com> wrote in message
> news:QjON8.48433$pw3.1679_at_sccrnsc03...
> > Hello Graham,
> >
> > I would recommed something similar to the following:
> >
> > Add the two fields to tblMaterials
> > MatIsAdditive - Boolean Used to classify material as an
> > additive if TRUE or base product if FALSE
> >
> > MatAdditiveKey - Number If MatIsAdditive is TRUE then this
denotes
> > the family of additives for this material
> > Else this field
> > indicates the family of additives that is added to this base product
> > Default field to 0
to
> > indicate no additives needed
> >
> >
> > Add code that checks for MatAdditiveKey > 0 to the procedure that adds
> > records to tblIngredients after a record is saved.
> > If it is greater than 0 AND MatIsAdditive is FALSE then it indicates
that an
> > additive could be added to this base product.
> > Store the Qty/square meter is needed of the base material in a variable.
> > Store the MatAdditiveKey from the base material in a variable.
> > Present a dialog with a subform populated with a list of additive
materials
> > based on the stored MatAdditiveKey
> > a text field that stores the percentage of additive needed and Cancel /
Add
> > command buttons.
> > If a user selects an additive, enters a positive percentage and presses
the
> > Add command button a process is envoked that
> > adds another record to the ingrediat table that is based on the selected
> > additive and stores the AppRate based on the percentage
> > times the stored AppRate value you stored in the variable earlier.
> >
> > I hope that this makes sense, it is summer vacation and my kids have
been
> > constantly hovering over me as I have attempted to
> > gather and present my thoughts.
> >
> > Best regards,
> > Howard
> >
> > "Graham Bellamy" <dontwriteme_at_ask.first.com> wrote in message
> > news:ae87k5$qto$1_at_perki.connect.com.au...
> > > I am applying a surface finish to industrial floors. To an Ingredients
> > table, I add
> > > Material and Application Rate. From this (knowing the area) I can
> > calculate the Quantity
> > > of each material needed. My problem is where a material does not have
its
> > own application
> > > rate, but is a percentage of another Material. I don't know how to
> > calculate the quantity
> > > of all materials and end up with this info in 'one' calculated field
of a
> > query. I believe
> > > I need it in just one field so I can later use it in Reports (total
job
> > cost, cost of jobs
> > > done for Month etc).
> > >
> > > Can anyone help?
> > > This is what the structure looks like:
> > >
> > > tblMaterials
> > > MatID (pk-autonum)
> > > MatName etc
> > >
> > > tblSection (contains properties of the section of the building)
> > > SectID (pk)
> > > Description
> > > FloorArea etc
> > >
> > > tblIngredients
> > > IngID (pk-autonum)
> > > SectionID (fk 1-M)
> > > MatID (fk 1-M)
> > > AppRate etc
> > >
> > > So ingredient data would look like:
> > > IngID SectID MatID AppRate
> > > 1001 12 38 0.25 (L/square meter)
> > > 1002 12 26 2 (kg/square meter)
> > >
> > > Material 38 might be a primer, 26 a resin compound.
> > > Knowing the area (say 100 square meters), the Qty is just
Area*AppRate.
> > Easy.
> > > But now I need to add a pigment whose quantity is 1% of the Qty of
Resin.
> > This doesn't fit
> > > into my table.
> > > I tried making another table for additives
> > > tblAdditives
> > > IngID (fk 1-M)
> > > MatID (fk with tblMaterials 1-M)
> > > Percentage
> > >
> > > But then when querying the Ingredients and Additives, I got two Qty
> > columns, and I don't
> > > know how to get one column of ingredient quantities (an additive is a
kind
> > of ingredient).
> > >
> > > Your help in this matter is appreciated.
> > > Graham
> > >
> > >
> >
> >
>
>
Received on Thu Jun 13 2002 - 04:41:42 CEST

Original text of this message