Exercise App query question (1 Viewer)

JoeCruse

Registered User.
Local time
Yesterday, 21:20
Joined
Mar 18, 2005
Messages
157
Jon,

From your last post in the Samples forum, you asked why the workout query didn't work.

First, don't name queries with the prefix "tbl". You might notice I use a fixed naming convention in my database objects. I didn't always do this, but have been "converted" by this site and a couple of others to start using good developer technique. Naming convention is part of good technique. You don't have to stay with my prefix convention, but you need to use something, and keep it consistant, or you'll end up getting REALLY screwed up.

Second, you're going to have to do separate queries for weights and cardio, they won't coexist. A union query might have given you a common record source for workout data, but the cardio data table has an extra field to record intensity of effort, and foils that.

You might work around that by having only one data table for cardio and weight raw data, and setup the 2 subforms in the main workout table by making 2 queries based on the same table, but that might not work. You'll have to decide that for yourself.

If you stick with the current table format, just make a query to run a progress report on a member's cardio workouts and a 2nd one to run a progress report on their weight workouts.

You really need to put more data into the current tables. I had a hard time seeing how it went until I put a lot more test data into the tables. More workouts AND more sets of exercises. More test data will let you see more in your queries and let you decide if everything is going like you want it to.
 

DCXtreme

Registered User.
Local time
Yesterday, 19:20
Joined
Jan 5, 2006
Messages
43
Ok, I had a hunch that weight and cardio wouldnt work together.

I now have a query which works perfectly to show all the information minus the weights, how could I put cardio into there with the minimal amount of fuss?

I've sorted the query names etc too :)
 

JoeCruse

Registered User.
Local time
Yesterday, 21:20
Joined
Mar 18, 2005
Messages
157
DCXtreme said:
I now have a query which works perfectly to show all the information minus the weights, how could I put cardio into there with the minimal amount of fuss?

You lost me there, Jon. You had the query trying to run weights AND cardio, and now it is minus the weights, so isn't cardio still in there???
 

DCXtreme

Registered User.
Local time
Yesterday, 19:20
Joined
Jan 5, 2006
Messages
43
Sorry small typo!

I have it minus cardio.

It currently shows sets, weight and reps
 

JoeCruse

Registered User.
Local time
Yesterday, 21:20
Joined
Mar 18, 2005
Messages
157
I'm not sure you can, Jon. You are likely going to have to run one for weights and a separate, but nearly identical, one for cardio. The table for weightlifting data and the table for cardio data set into the same query won't return anything, from what I could work out. They have to be kept separate, when linked with the main workout table and exercise table to give a workout history.

There may be some way to get them together in the same query, writing up some SQL, but I'm not good enough to do it. If it were me, I'd hav a button to run a cardio report and a button to run a weights report. I wouldn't want to run both together anyway, as you're looking at 2 diffeent things.
 

DCXtreme

Registered User.
Local time
Yesterday, 19:20
Joined
Jan 5, 2006
Messages
43
Damn, that really messes up my plans, don't really know why it cant show both!
 

Users who are viewing this thread

Top Bottom