I am trying to write a program for my work (I am a dispatcher for a logging firm) and I need to record the amount of wood our crews have on their skidsites and send trucks to pick up the wood and take it to our customers. I am using SQL.
So far I have created tables, for crews, customers, trucks, wood types (Products) and Logstocks (the amount of wood on each crews skidsite.
I have created forms where I can add/update the truck numbers, crews, suppliers, woodtypes etc and they all work fine. Now I am onto the stocks form, and this is where I am a bit stuck.
In my Stocks table I have the following rows: SupplierID, ProductID, LoadsInStock, LoadsPlanned and LoadsAvaialble. The SupplierID and ProductID are foreign keys linked the the appropriate tables.
On My form I have dragged from my datasources the SupplierID as a ComboBox so that the user can select which crew they are adding the stocks for and the Stocks table as a DatagridView, with the SupplierID column not visable
My question is this �all crews have the same products, therefore I want the Woodtypes (ProductName) from the products table to always show in the ProductID column - the other 3 columns will change for each crew depending on how much wood they have. The LoadsInStock column will be entered manually when they call in their loads, the LoadsPlanned will show when a truck is sent for a load (this I still have to work out when I work on the loads carted part of the program) and the LoadsAvailable will show what is left to be picked up ie LoadsInStock - LoadsPlanned = LoadsAvailable this I think I can do with a query.
Any help with this would really be appreciated as I only have this to work out and then how to record the loads carted by the trucks and I think I am just about there.
Diane