Manipulate table contents from a form

V

vasal

I am developing a db for ordering and stock control for a friend and i want
to reduce the quantity of a stocked product when this quantity is added to
an order:

eg. a customer orders 10 CD-R disks; when this order is executed update
stock information for CD-R disks by reducing the available quantity by 10.

How can i achieve that by code (open the table, locate the record and adjust
the appropriate value)?


THANX!
 
S

Steve Schapel

Vasal,

This could be done via an Update Query. That would probably be the
second to easiest way. The easiest way would be to completely remove
the available quantity field from the table altogether, which will
thereby remove the need to update this value. After all, it is
redundant and unnecessary information. If you have recorded all the
trasactions where disks are received into stock, and all transactions
where disks leave stock, then the available quantity can always be
easily retreived, whenever needed, via a simple totals query.
 

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