J
Jamil Afza
I am trying to take a value from a query (which is a calculation of averaging
four numbers) and be able to use it for another more complex calculation in
Visual Basic. I am making a module for the calculation and intend to embed it
into the form where the result of the query is already displayed.
The VB code will be a loop which will contain an equation that is iterated
until it generates a value smaller than the critical value. Upon each
iteration value will be added to by one until the critical value is reached,
the value of N, which results in a value less than the critical value, will
be displayed. "p" is the value which will be to be pulled from the query.
This is the equation
((1-p)^N))*p < .000943
A little background on the database, in case it helps. The main table is a
list of workers, the database is meant to keep track of how many orders the
workers picked per week and how many errors they made (in a separate table).
The query takes the most recent four weeks of data and calculates the average
errors per order. This is the value which is needed for the more complex
calculation. The user of the database will pick the workers name from a drop
down box and a form will then come up with the result of the query (error per
order) and the result of the VB code (the N value).
four numbers) and be able to use it for another more complex calculation in
Visual Basic. I am making a module for the calculation and intend to embed it
into the form where the result of the query is already displayed.
The VB code will be a loop which will contain an equation that is iterated
until it generates a value smaller than the critical value. Upon each
iteration value will be added to by one until the critical value is reached,
the value of N, which results in a value less than the critical value, will
be displayed. "p" is the value which will be to be pulled from the query.
This is the equation
((1-p)^N))*p < .000943
A little background on the database, in case it helps. The main table is a
list of workers, the database is meant to keep track of how many orders the
workers picked per week and how many errors they made (in a separate table).
The query takes the most recent four weeks of data and calculates the average
errors per order. This is the value which is needed for the more complex
calculation. The user of the database will pick the workers name from a drop
down box and a form will then come up with the result of the query (error per
order) and the result of the VB code (the N value).