Several Loads from a single Order; Design Qtn?? Help!

N

niuginikiwi

Hi,
I am been trying to think of a way out on this situation but I can not
clearly see one. Can anyone help?
I have tblOrder and tblOrderDetails along with a main frmOrders and subform
frmOrderDetails and I go along and process an order like normal... but what I
really like to do is :
For the same order number, there are several loads ( different trucks come
in and load up order lines that are maked done) and the same order number
continues until everything is gone
What I want is when a truck comes to pickup a load each time, I want to
produce a different freight docket (consignment note) for each of those
trucks....
The freight docket takes in the Order Lines marked as done....
How can I come up with a way I can throw the OrderID and the order details
marked as done to the Freight form and do a freight docket...
cheers
 
D

Damian S

Hi niuginikiwi,

How about having a button in your subform (I assume your subform is in
continuous form view, if it's not, change to that and continue) that opens a
Freight Docket form. Have the Freight docket form pick up the OrderID like
this:

forms!frmOrders.subfrmOrderDetails.form.lngOrderID

Where subfrmOderDetails is the name of the SUBFORM CONTROL not the form that
is in the subform.

Hope that helps.

Damian.
 
T

Tim Ferguson

What I want is when a truck comes to pickup a load each time, I want
to produce a different freight docket (consignment note) for each of
those trucks....
The freight docket takes in the Order Lines marked as done....
How can I come up with a way I can throw the OrderID and the order
details marked as done to the Freight form and do a freight docket...
cheers


You need some more tables...

TruckTrips (
*TruckNumber
*DateAndTimeOfTrip
DriverID
TotalMiles
TimeTake
etc.
)

LoadingDockets (
*TruckNumber
*DateAndTimeOfTrip
*OrderNumber
*OrderLineNumber
PutOnBy
PercentageDamagedAtBeginningOfJourney
etc
)


The idea is that the TruckTrips keeps track of every load that is taken
out of the plant. Its primary key (TruckNumber, DateAndTimeOfTrip) means
that any one truck can only be doing one trip at a time, which is
probably true.

The Dockets table is a junction table between TruckTrips and the
OrderLines tables (assuming the PK for the OrderLines table is
(OrderNumber, OrderLineNumber)). Although the four-field PK looks
awkward, it's only two FKs stuck together like any other junction table.

With this kind of set up, it's easy to make queries to see which
OrderLines have not been loaded yet, which Trucks completed a particular
Order and so on.

Hope that helps


Tim F
 

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