Database structure

J

jroy921

I have three tables... tblItems, tblEmbarkBoxes, and tblContainers. There is
a field in the tblItems table called EmbarkedIn. I want the value in the
field to be an embark box or a container. Then there is a field in the
tblEmbarkBox called EmbarkedIn. I want the value to only be a container. If
anyone can help, please do. Thanks.
 
A

Allen Browne

This looks like a bill-of-materials type structure, where one thing goes
inside another, and that that one may go inside something else.

For a downloadable example of working with that kind of data, see:
http://www.mvps.org/access/modules/mdl0027.htm

I'm not sure what EmbarkBoxes are, but certainly containers are re-used.
That means the items inside relate to a particular *loading* of the
container, and not to the container itself.
 
J

John Vinson

I have three tables... tblItems, tblEmbarkBoxes, and tblContainers. There is
a field in the tblItems table called EmbarkedIn. I want the value in the
field to be an embark box or a container. Then there is a field in the
tblEmbarkBox called EmbarkedIn. I want the value to only be a container. If
anyone can help, please do. Thanks.

If I understand, a Container can contain either boxes (each of which
can contain one or many items), or you might put some items directly
in the container without a box... right?

I would suggest a "pseudobox" for the latter case - Box 0 or "the
nonbox" or something. Each Item should be in a box, either a real box
or this nonbox; each box (real or virtual) would in turn be in the
container.

John W. Vinson[MVP]
 
J

jroy921

John,

Yes an embark box can have multiple items, and a container can store
multiple items and embark boxes.

That "pseudo box" is an excellent idea. I used some code in a form to
select the right container. What I mean is each embark box goes into a
unique container. From there I used visual basic to select the container for
that embark box as the container for the item.
 

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