?
Solved

2 Access tables, count verbiage used

Posted on 2016-11-07
6
Medium Priority
?
50 Views
Last Modified: 2016-11-07
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
Comment
Question by:QMBB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 41877711
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
 

Author Comment

by:QMBB
ID: 41877719
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 41877744
the color field contains text that are not color, is this correct  (21 - 29 in)
0
Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

 

Author Comment

by:QMBB
ID: 41877754
Yes, 2 records, but I need to find those as well.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 41877773
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
 

Author Closing Comment

by:QMBB
ID: 41877794
Thanks very much.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question