As for the vendor I would like to have a
combobox that when I select the vendor, all the other information about the
vendor will populate the other fields in the vendor table
well, that vendor data would have to come from "somewhere", so you're kind
of thinking about it backwards. here are my suggestions - but remember that
you know a lot more about your company's requisition process than i do, so
the following is *not* a substitute for you learning the basics of data
modeling and applying those principles to your database design process.
tblVendors
VendorID (primary key, probably Autonumber data type)
Vendor - Text
Address1 - Text
Address2 - Text
City - Text
State - Text
Zip - Text
PhoneNumber - Text
Contact - Text
FedId - Text
ContactNumber - Text (i assume this is a phone number field, so make it Text
data type rather than Number data type.)
< this is a list of vendors. each field in this table should describe an
attribute of a specific vendor, and nothing else. >
note that if you may have more than one contact person for a single vendor,
then you should remove the Contact and ContactNumber fields from this table,
and create an additional table:
tblVendorContacts
ContactID (primary key, probably an Autonumber data type)
VendorID (foreign key from tblVendors, Long Integer)
Contact - Text
ContactNumber - Text
okay, next, the fields in your tblCost suggest that "things" will be
requisitioned, as well as consulting services. so i'll presume that more
than one thing may be requested on one requisition. in that case, you'll
need the following tables:
tblRequisitions
MISNumber - Number (i'll assume that the MISNumber is unique to each
requisition, so use it as the primary key. if it's NOT unique, then add a
separate primary key field of data type Autonumber.)
Requester - Text
Unit - text (this is an area)
Account - Text
OBCode - Text
Description - Text
Justification - Text
Category - Text
after Requestor, the rest of the above fields - from Unit to Category - are
questionable. any field that applies to a specific item being requisitioned
needs to be in the following table. any field that applies to the
requisition as a whole should remain in the table above.
tblRequisitionDetails
DetailID (primary key, Autonumber)
MISNumber (foreign key from tblRequisitions)
Quanity - Number
UnitofMeasure - Text
UnitPrice - Currency
(note that i did NOT include a TotalCost field. total cost is a calculation
of Quantity times UnitPrice; since you are storing the raw data necessary to
calculate the total, you should NOT save the total as data - just calculate
it whenever you need it in a query, form, or report.)
as you can see, to make a firm decision on how to correctly structure the
tables, you need a thorough understanding of the process - which i don't
have. so use the above design as an example only, read up on data modeling
and normalization, analyze the process you need to track to be sure you
understand it thoroughly, and design your tables/relationships from there.
hth