I need to develop some code that will schedule and track availablilty of truck trailers based on our shipment schedule and maintenance.
What I would like to do, is develop an Event Procedure that will assign the trailers automatically to shipments based on their availablility.
*Tables* (Basic Elements of them)
Shipment_Schedule_Tbl
ShipmentID
Shipment and Return Dates
Shipment_Number
Maintenance_Tbl
PackageID
Trailer_Number
On_hold (this tells us if the trailer is being held for Maintenance)
Dates
Package_Track
ShipmentID
Trailer_Number
A Union query marries the "shipment schedule" and the "trailer maintenance schedule" so that I can get a listing of dates that the each trailer is "In-Use", "Available", or "On-Hold".
It is unclear to me how to go about automatically assigning these trailers to shipments. I don't see how to do it with a query...seems like I will need to use code. Any ideas and if so can you point me in a direction that will give me some idea of how to go about coding it.
Thanks in Advance!
What I would like to do, is develop an Event Procedure that will assign the trailers automatically to shipments based on their availablility.
*Tables* (Basic Elements of them)
Shipment_Schedule_Tbl
ShipmentID
Shipment and Return Dates
Shipment_Number
Maintenance_Tbl
PackageID
Trailer_Number
On_hold (this tells us if the trailer is being held for Maintenance)
Dates
Package_Track
ShipmentID
Trailer_Number
A Union query marries the "shipment schedule" and the "trailer maintenance schedule" so that I can get a listing of dates that the each trailer is "In-Use", "Available", or "On-Hold".
It is unclear to me how to go about automatically assigning these trailers to shipments. I don't see how to do it with a query...seems like I will need to use code. Any ideas and if so can you point me in a direction that will give me some idea of how to go about coding it.
Thanks in Advance!