Product Table

  • Thread starter Thread starter janzak
  • Start date Start date
J

janzak

I want to create a product table. I have many products with different
colors. How can I create my product table so I can search my products
by color or by product number. Also how can I make sure I do not enter
a duplicate product & color combination. For example, I can have many
product X with different colors. But I can not have more than one
product X in blue colors. And I can have many product Y with different
colors and only one product Y in blue color.

Thank you

Jan
 
To search, you will simply have to specify which field you are searching and
what criteria. Not sure I understand that question.

Your second question is solved by creating a compound index in your table.
In other words, you create an index that consist of the Product and the
color. You tell it that this index can't contain duplicates.

In your table design-view, click View, then Indexes. Enter an index name
and then your field. In the next line, leave index name blank and enter
your second field. This will create a compound index. Make sure to set the
"Unique" property.

Refer to HELP or post back if you have more questions.
 
janzak said:
I want to create a product table. I have many products with different
colors. How can I create my product table so I can search my products
by color or by product number. Also how can I make sure I do not enter
a duplicate product & color combination. For example, I can have many
product X with different colors. But I can not have more than one
product X in blue colors. And I can have many product Y with different
colors and only one product Y in blue color.

Thank you

Jan

Adding to what Rick wrote. It sounds like you may need a little thought
about table design. So far it looks like you should have two tables -
fields

Product
Product Name
Product Number
Color number

Color
Color Name
Color Number
 
Thank you for your help.
How about if I make a combination "Primary Key" of both my Product ID
and Product Color? Does that work the same as your suggestion of making
a combination Index?

Thank you

Jan
 

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

Back
Top