Do you have a typical invoice/order system here such as:
If so, shouldn't the gifts be listed a line items in the order, but with a price of 0.00?
What I'm suggesting is that you can treat the gifts like any other item ordered by listing them with their order. Then a shipments table with related lineitems, can list each shipment sent to fulfill the order.
this db manage only gifts, no other thing, it's only a register.
the situation is:
the warehouseman, at the moment of packing, write the customer code in a text, if there are already some gifts given to this customer a story of the gifts sent are showed, if not it create a new record with the code already inserted in the right field
Even though these are only gifts, you may want to treat them like an order as a way to track what should be sent and what has been sent.
Please explain your procedures in more detail. I can think of any number of ways to do this, but your current procedures will help me recomend something that is a "best fit" for what you want to do. I'm particularly interested in how you determine what gifts should be sent to a customer in the first place so that I can use that "method" as part of my suggestion for checking on what gifts were sent.
there are 5 types of gift : k1, k2, k3, k4, k5
many customers : 1, 2, 3, 4, 5, ........, x
I must make a db which acts as a registry for this gifts.
1 k1 12/5/11
1 k2 k3 13/5/11
2 k1 13/5/11
if I search the customer 1 it must show the previous expedition, if I search the customer 3 it must show a window that warn that is the first order for him and must create a new record with already inserted 3 as customer code
This next table structure is one that I've shown to you before, but I've renamed the tables:
Customers::CustomerID = GiftsSent::CustomerID
Gifts::GiftID = GiftsSent::GiftID
With this structure, you can place a portal to giftsSent on your Customers layout to list all gifts that have been sent. You can use a drop down field in this portal on the GiftID field to select a gift for the customer from the Gifts table. Other fields in the portal can list details such as a description of the gift, when it was shipped and on what date. (When you've selected a gift for that customer, it will be listed in the portal, but you'll be able to see it wasn't shipped as the shipping fields will still be blank.)