Sarah,
I think you may need to re-think your database design a little.
You will use your Customers table for the customer's data. You mentioned a
"Products" table that you say will have all the information about your
products that are being returned. All this is just fine, however, you need to
realize that you have a "many-to-many" relationship between the Items and the
customers.
In your case you may have customers returning may many customers retuning
one or more of the same items that are being returned by many customers. So,
you get the idea as to why you have to have some way to link many customers
to many items being returned.
Any time you have a "many-to-many" situation, you must have an intermediate
table.
To accomidate this, you not only need your Products table and Customes table
but you also need a third table: call it "tblProductsReturned". I assume
that your Products table has an AutoNumber field as the Primary Key field
(maybe ProductID) and that your Customer table has an AutoNumber field as the
Primary Key field (maybe CustomerID). Here note that I did notice that your
current Customer table has the confirmation number as the Primary Key. The
confirmation number field will need to be moved to a third table which would
consist of at least three fields. ItemID and CutomerID (both as a Long
Integer type fields used as a Foreign Key to their respective tables) and the
confirmation number field for one specific return.
As for forms, you will need a form where the new Confirmation Number is
generated. (you can cross that bridge after the get the rest of the structure
fixed) in this form you can include a combo box or list box, which ever is
appropriate to allow users to find the Product being returned and the
Customer that is wanting to return the Product. Each of these controls
;would have the appropriate ID field as its bound field, thus storiing the
confirmation number, the ProductID and the CustomerID in the third table that
I described above.
In yet another form, you could display all of the detail info about the
Product and the customer relative to a specific return based on the
confirmation number. You would accomplish this by having a form
(tblProductsReturned) as its record source and two sub forms. One for the
Product information linked to the main form by the ProductID field and one
for the Customer information linked to the main form by the CustomerID field,
using the "Master/Child Link fields" for the sub forms.
Then when someone calls in, you would have your application to open your
Product Being Returned form to a new record. This is where the new
confirmation number would be created (VBA code required) and the user would
locate the Customere and the Product as described above.
There are actually many other things that you could incorporate into this
type of application but if you can use this info to get you moving along with
the development of your application, then you can always add more
functionality later.
--
HTH
Mr B
email if needed to:
draccess at askdoctoraccess dot com