Totally stuck

oohmygod831

Registered User.
Local time
Today, 21:22
Joined
Feb 16, 2005
Messages
43
Firstly i apologise if ive put this in the wrong section but i didnt know where it should go

i am writing a database that will allow users to book out tools that they will use for a job and then book back in once they have finished with them.

i have a 'Quantity' field and i need to reduce this value by 1 whenever a tool is booked out. How would i do this?
 
What kind of quantities are we talking about?

If you had an entry for each individual tool, and a field in there which indicated checked in/out, you could just run a query to do a count of how many are checked in.
 
Won't you need to have a Max total to be booked out? i.e. So people can't book out tools that are not in stock?

If so, you need to compare the number in stock against the Max number (to ensure it's ok to book out) and then deduct the number booked out from the previous total by using a query.

I wrote a Pharmacy database which did the same thing.

Col
 
The table is set up like this

Tool_ID
Tool_Name
Quantity

Most of the tools only have a quantity of 1 but a few have upto 8

i dont know if a checked in/out field would work with the way i have the table set up and that table is dependant on another which is dependant on another.
 
Simple Software Solutions

I assume you have a screen that you go into which allows you to select a tool and indicate whether it is being taken out or returned?

When you select the tools you will also be able to see the quantity in hand? Yes?

If it is being taken out then reduce the quantity by however many is being taken out up to the value of how many you have in hand. You should also have another field that holds the number of tools currently out on loan, whatever. Because you will never be able to reconcile missing or unreturned tools.

If the item is being returned then do the opposite add the quantity returned to the In hand figure and reduce the on loan figure by the same amount. Remebering you can only return a value upto the total number of tools on loan.

This way you should have a full reconciliation of all tools and their respective quantities.

Obviously you will be recording who is taking them out and the dates/times they took them. Along with dates/times returned. I have only explained the area you are concerned with.

CodeMaster::cool:
 
This type of application is a regular in here. I would do a search.
 

Users who are viewing this thread

Back
Top Bottom