Joan,
Yes, I agree, it is not an entirely simple project.
Regarding your butt getting bitten, this sometimes happens when you move
too quickly to the next step before you have clarified the basic
design questions. The basic design questions involve having a table
structure that will allow all required data to be stored such that it
reflects the actual real-world relationships between the elements of
that data. The more you can leave user operational functions out of
your thinking at this stage, the better. "I wouldn't need it for the
form to group the records together for viewing? The user also will run
a report from this for tracking parts received."... these are not good
reasons for the existence of a table. If you have the tables as
discussed, tblPOHeader, tblPOLine, tblReceiptLine, then these tables
will contain all of the information you need. Draw out a diagram of
these tables, listing the fields and the relationships between them...
I'm sure you'll see what I mean. Forget forms and reports for now...
you should only think of them *after* you get the tables sorted. (As it
happens, though, the forms and reports you need will easily be done with
this table structure.) The table design is dictated by the actual data
elements you are working with. Thus, my idea of the plan changed after
you informed me that a PO Line item could be split over more than one
Receipt... a change to the actual data relationships (as far as I was
aware), therefore a change to the table structure. No, you do not need
a tblReceipts. Add it temporarily to your table diagram, and note that
it contains nothing that is not already there in the other three tables.
You are still also going to need to think through again how you will
designate which POLine items will be included in the Receipt. I don't
understand your "business rules" as yet, based on the way things
*really* happen as regards when goods are included, so I can't really be
specific. Maybe you need a Yes/No checkbox field for Received that you
can manually indicate each item for inclusion? But I don't think the
OnOrderQty thingie will work for this. That would mean that for the
first Receipt for a given PO, *all* POLine items will be tagged for
inclusion, since for all of them OrderedQty-QtyRecieved will be >0, and
then for the next Receipt for that PO, *all* of the POLine items where
OrderedQty-QtyRecieved>0 will be incuded, whether or not there were any
actually received. This is not what you want, is it? You want to
include those POLine items where at least some of them were actually
received.
As for your proposed Transactions table, as I tried to indicate before,
this idea is flawed as you have described it. The ReceiptLines table as
we have been discussing already contains the information about Receipts.
That's it. You've already got a storage spot for this info. You
don't need to put it anywhere else as well, and you should not do so.
It's not 100% related to your project, but you might also get some value
from having a look at Allen Browne's article about inventory tracking,
see
http://members.iinet.net.au/~allenbrowne/AppInventory.html