• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 71
  • Last Modified:

2 Access tables, count verbiage used

I have a table named Orders with field Product. In that field, there is string of text which contains the color of the product. In another table, I have field Color, which has all the possible colors that may be in the text string in the other table. I need to count the number of Products in table Orders that have the Color from the second table. Reason: I need to count how many orders used each possible Color. Ideally, I would add a field called Color in table Orders right after field Product which would store the color found in the other table.
0
QMBB
Asked:
QMBB
  • 3
  • 3
1 Solution
 
Rey Obrero (Capricorn1)Commented:
first, you need to create a UDF to parse the content of the field Product to get all the colors for that record.
next is to compare the result to the values in the  second table.


a sample db is needed to do this.

upload a copy of the db with the two tables.
0
 
QMBBAuthor Commented:
0
 
Rey Obrero (Capricorn1)Commented:
the color field contains text that are not color, is this correct  (21 - 29 in)
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
QMBBAuthor Commented:
Yes, 2 records, but I need to find those as well.
0
 
Rey Obrero (Capricorn1)Commented:
test this revised db, I added a field color in table orders and populate by running the sub checkColors()

see code In module1  checkColors()
db12_rev.mdb
0
 
QMBBAuthor Commented:
Thanks very much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now