forms and queries

rblair11

Registered User.
Local time
Today, 10:04
Joined
Nov 4, 2005
Messages
36
I have a database that I use to track my workouts. I am very new to Access and am just starting to learn some simple VBA code.

I have the following tables:

tblBodyFocus
Body Type

tblExcercises
Excercise_ID
Excercise
Body Type (Foreign)

tblWorkoutLog
Log_ID
Excercise_ID (Foreign)
Date

What I would like to do is generate a query that will give me a summary of workout dates and Body Type. Each date can have several excercises but each excercise only has 1 body type associated with it. What I want to avoid is multiple listings for body types. In other words I want to generate this:

Date
-Body Type
10/25/05
-Arms
10/25/05
-Legs
11/2/05
-Arms
11/2/05
-Abs

but not:

Date
-Body Type
10/25/05
-Arms
10/25/05
-Arms
10/25/05
-Arms

I'm new to this so I may not have given you enough information. I don't have any code to post at this point but please let me know if I you need any additional info.

Thanks.
 
Hi - Welcome!

You need to use the Totals / Aggregate Functions so that you can GROUP BY date and body type.

Look for the Summation Sign (Sigma, Sort of a odd looking 'E' on the tool bars when you are in the query design view.) Clicking this will toggle the Totals on and off for the query. When you see the Totals: displayed under the field, select GROUP BY for those fields.

Harder to explain than it is to do!

hope that helps,

- g
 
Worked Great - Thanks

Wow, that sure was easy. I almost wish it wasn't so straightforward so that it would give me another reason to learn more code.

Sorry I posted this in the wrong section, should've been in the query fourm.

Thanks for the help!
 

Users who are viewing this thread

Back
Top Bottom