Calculate Percent Using Fields Located In Two Tables

  • Thread starter skyrise via AccessMonster.com
  • Start date
S

skyrise via AccessMonster.com

I think that I am on the last major block in the completion of a database
build using Access 2007.

I have a main Table and Form called Participants.
They have two main fields:
Total Randomized for the number of participants that were randomized into a
study.
Total Completed for the number of participants that completed the study.

There is a subtable and subform called PercentEthnicity.
PercentEthnicity uses a Lookup Table called Ethnicity to allow the user to
either select a listed ethnicity from the drop down list or to add a new
ethnicity.
The table contains the following additional fields:
- Number of participants in the selected ethnic group.
- Percent Random to calculate the percent of this group out of the total
number randomized into the study. (Field properties set to Standard and 4
decimal places)
- Percent Complete to calculate the percent of this group out of the total
number who completed the study. (Field properties set to Standard and 4
decimal places)

I believe that this is an easy solution, but for some reason, I can’t get any
attempts to formulate the percent to work in these fields. Maybe I’m a
little brain dead from burnout. Assistance would be greatly appreciated.
 
J

Jeff Boyce

If you are trying to do calculations in the form that rely on values in
controls in other objects (i.e., using main form objects in calculation
subform percentages, or vice versa), you need to refer to the object
describing the full 'path' to get there.

For example, if you are referring to a control in the main form (i.e., the
"parent") from a subform, you might use:

Forms!YourMainForm!YourControlName

(or use the Me.Parent... syntax).

If you are referring to a value in a subform control from the main form, use
something like:

Forms!YourMainForm!YourSubformControlName.Form!YourControlINSIDETheSubform

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Top