?
Solved

Assigning a value with various strenght

Posted on 2014-12-27
2
Medium Priority
?
95 Views
Last Modified: 2014-12-28
I am trying to create a database connecting the muscles of the human body in relation with the action they do.
I've created a Muscles Table and an Action Table and I created a relationship between them. Then i've created a form where I can automatically write the muscle and then the connected action. (For Example: Deltoid Muscle / Shoulder Abduction, Should Flexion).

The problem is, some muscles are contributing only to a weak extend to an action and some to a strong extend. Therefore, I would like to create another option, with which I can choose whether the muscle is Weak or Strong (regarding that particular action), or better , whether I can choose a percentage. So that, when I run a query asking which muscles are required for a certain action, that it will be shown that Muscle A contributes x %, Muscle B contributes y % etc.

How can I do this? Thanks a lot.
0
Comment
Question by:Chrysaor
[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
2 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 40519703
<<How can I do this? Thanks a lot. >>

 What you have is called a "Many to Many" relationship; a muscle may have one or more actions it may be involved in, and a action may have one or more muscles involved with the action

To do this, you use a linking table:

tblMuscles
MuscleID - PK - Autonumber
MuscleDescription - Text

tblActions
ActionID - PK - Autonumber
ActionDescription - Text

tblMuscleActions - One record per unique combination of Muscle and Action
tblMuscleActionID - PK - Autonumber
MuscleID - CK1A - FK to tblMuscles
ActionID - CK1B - FK to tblActions
PercentContributed - Number - 0 - 100

'PK' is primary key, 'FK' Foreign Key, and 'CK' is candidate

 On the last table, some might design the table without tblMuscleActionID as the combination of MuscleID and ActionID  must be unique (a given muscle cannot be assigned to an action more than once).

In terms of forms, Access cannot model a M to M directly.   What you do is use a main/subform combination and do one side of the relation at a time (which is a one to many).  For example,

Main form is based on the muscle table, subform shows the records in the linking table.   In the subform, you have a combo to select the action along with a text control to enter the percent.

Then you would have a second main/subform, but for the "action" side:   Main form is based on the action table, subform again shows the records from the linking table, but now you have a combo that allows you to select a muscle.  Again a text control to enter the percent.

Jim.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40519724
to add to jim's post, watch this demo

Demo: Set the relationship between two tables
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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