Assign the value of "UnitsOnOrder" and "UnitsOnHand" to another fi

G

Guest

Hello all,

I have post this question several days ago, but sadly there is no
reply...Would anyone please follow up? Please !!!

I have a inventory control database here. For the products, on the
"products" form
, "UnitsOnOrder" and "UnitsOnHand" is two caculated control based
on the invertory transaction history. (Numbers of ordered, received, released)

because I have another read only "products_ro" form to allow users only view
the
products records. and I do not want to caculate the "UnitsOnOrder" and
"UnitsOnHand" again when every time to load the "products_ro" form. Hence I
want to assign those two caculated value to another
two corresponding control(related to some column) on "products" form
whenever the caculation is done(it happens after the user access the
"products" form and go through the "products" records).

I have tried to use the "AfterUpdate" "OnChange" event of the caculated
control on the "Products" form to setvalue to the destination controls, but
looks like none of events was not triggered becuase of the caculated control.

So which events should I use? Thanks
 
A

Amir

I'm thinking you are using and modifing inventory control
database from MS. And if I understand correctly you are
trying to duplicate calculation of UnitsOnHand &
UnitsOnOrder procedure but on different form, with
different fields??? If so, you need to look at subform
(Products Subform) in design view, you can then see the
procedure. The txtbox on products form is for display
only. You could use same procedure for any form... if you
can post back with bit more decription...Not sure if that
is what are you trying to do...
-----Original Message-----
Hello all,

I have post this question several days ago, but sadly there is no
reply...Would anyone please follow up? Please !!!

I have a inventory control database here. For the products, on the
"products" form
, "UnitsOnOrder" and "UnitsOnHand" is two caculated control based
on the invertory transaction history. (Numbers of ordered, received, released)

because I have another read only "products_ro" form to allow users only view
the
products records. and I do not want to caculate the "UnitsOnOrder" and
"UnitsOnHand" again when every time to load
the "products_ro" form. Hence I
 
G

Guest

I develop and setup inventory control database using MS Access. There are two
tables called "products" "inventory transactions". The products form is based
on both, the main form is based on "products" and subform showing all related
the "inventory transactions" based on table "inventory transactions". (the
link is based on "Product Part ID" in both tables". As you know, for the
inventory control, for each products, you must show the number of "Units On
Hand" and "Units On Order". And these numbers are the caculated value varied
by the inventory transactions for the product (How many you received, how
many you ordered, and how many you sold.) for example, \

on the "products subform", there is two cacluated control:

[UnitsOnHand]=Sum(nz([#Received])-nz([#Sold]))
[UnitsOnOrder]=Sum(nz([#Ordered])-nz([#Received]))

And these two value will be referenced on the main form "products" so that
showing the "UnitsOnHand" and "UnitsOnOrder". For every products, when you
open the products form and go through the records, the "UnitsOnHand" and
"UnitsOnOrder" will be caculated on the subform first and referenced on the
main form and showing up. And in theroy I could not setup two columns in the
"products" table called "UnitsOnHand" and "UnitsOnOrder" to store the value
of them because the nature of the it. Otherwise there are too many event
procedures need to set up to keep the caculation value right any time the
user add/edit/delete the related inventory transaction. So display the values
everytime loading the records is the right choice.

But for some users they do not have the permissions to add/delete/edit
inventory transactions and the "products" and "products subform" should only
"Read only" to them. I want to avoid the duplicated caculation on read only
form because it is already caculated on another form, on which form I want to
do something to store the value to prepare for showing on the read only form.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top