DeveloperBarn Forums

Go Back   DeveloperBarn Forums > Databases > Microsoft Access

Discuss "Exercise Database" in the Microsoft Access forum.

Microsoft Access - Microsoft Access is a database for small to medium applications. Learn tips and tricks and best database practices here.


Reply « Previous Thread | Next Thread »
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old June 9th, 2008, 12:15 PM
New Member

 
Join Date: Jun 2008
Posts: 16
Thanks: 12
Thanked 3 Times in 2 Posts
Rep Power: 1
jchrisf is an unknown quantity at this point
Default Exercise Database

Hello,

I am an Access newbie and this is my first Access post. I bought a couple of Access books a couple of months ago and have been reading through them. Access is an awesome database tool and I am looking forward to learning as much as I can about it.

Well, I thought I'd start with a database that was very easy and decided to create a database to log my workouts... but it seems that the books make Access appear much easier than it really is... Can someone look at my database attached to this post and tell me what they think of my table structure and relations and also help me figure out how to get the main table to appear on the top level of the form and subform I have created? I would also like to know how to prevent the Exercise form (not the subform) I am using from creating a new entry for an item if it is already in the table?
Attached Files
File Type: zip Exercise.zip (21.5 KB, 10 views)
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old June 9th, 2008, 12:27 PM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 73
Thanks: 18
Thanked 20 Times in 15 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

Ok, so what are you wanting to happen here? It appears that the exercise is standard and that the sets are related to the exercises....

Are you wanting to open the form, it gives you a start date and start time, then you choose what exercise, and how many reps / weight?

I guess the question is, how do you want to log this?

Comments on this post
jchrisf agrees:
Reply With Quote
  #3 (permalink)  
Old June 9th, 2008, 01:51 PM
New Member

 
Join Date: Jun 2008
Posts: 16
Thanks: 12
Thanked 3 Times in 2 Posts
Rep Power: 1
jchrisf is an unknown quantity at this point
Default

I would like to open the form and type in the date time... etc from the tblMain, then select an exercise, then type in the set number, reps and weight used for every set I do for that exercise. Then when finished with that exercise, move on to another and input the sets, reps, weight for that one.

Right now I can't figure out how to get all these forms into one form correctly and I cannot keep the tblExercises from adding a new record for the same exercise if it is already in the table.
Reply With Quote
  #4 (permalink)  
Old June 9th, 2008, 02:11 PM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 73
Thanks: 18
Thanked 20 Times in 15 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

ok, do you want to enter in the number of reps and weights used manually? For example:
Actual Reps - weight
8 reps - 113 lbs
21 reps - 61 lbs
38 reps - 33 lbs

Or do you want that predetermined? For Example:
Rep Heavy - 10 reps - 100 lbs
Rep Med - 20 reps - 50 lbs
Rep Light - 40 reps - 25 lbs
Reply With Quote
  #5 (permalink)  
Old June 9th, 2008, 02:20 PM
New Member

 
Join Date: Jun 2008
Posts: 16
Thanks: 12
Thanked 3 Times in 2 Posts
Rep Power: 1
jchrisf is an unknown quantity at this point
Default

Yes, I would like to enter the Sets, Reps and Weight manually because this always changes for me.
Reply With Quote
  #6 (permalink)  
Old June 9th, 2008, 04:21 PM
AOG123's Avatar
Lightning Master

 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 75
Thanks: 6
Thanked 20 Times in 15 Posts
Rep Power: 1
AOG123 is on a distinguished road

Awards Showcase
Microsoft Access 
Total Awards: 1

Default

Hi,..

Welcome to the forums,..

My take on this is actually quite simple,.. the only relationship that needs to be directly set is the exercise id to the daily routines,

tbl_exercise
ExId
Exercise

tbl_fixed_sets
SetID
Reps
WeightUsed

tbl_main_routine
ID - relationship to EXid
Other fields,
RoutineSelected - relationship via combo to SetID

Now i've tried to include a few things in the sample for you,. queries, forms, macros and modules,. to have a look through.

Now you'll notice i've based all the forms on query's,. this is standard practice as tables hold no order,.

You can enter to exercises directly through the combo,. you will be prompted as to whether you wish to add a new one. The fixed sets is simply unbown on the main form. Its only purpose is visual.

Now also,. you wouldn't usually show a primary key auto number on a form, but for the sake of this "exercise",. i've left it on as i have no descripton on the fixed set names.

Edit,.. upload corrected

Comments on this post
jchrisf agrees:
Attached Files
File Type: zip exercise.zip (44.9 KB, 11 views)
__________________
If i helped you, make me famous by clicking the

Last edited by AOG123; June 9th, 2008 at 04:27 PM.
Reply With Quote
The Following User Says Thank You to AOG123 For This Useful Post:
jchrisf (June 9th, 2008)
  #7 (permalink)  
Old June 9th, 2008, 04:50 PM
New Member

 
Join Date: Jun 2008
Posts: 16
Thanks: 12
Thanked 3 Times in 2 Posts
Rep Power: 1
jchrisf is an unknown quantity at this point
Default

Thanks AOG123!

I am really going to study this example and see all the cool stuff I can learn from it. I would like the Main table with the date and time information in it to be the top form with the exercise selection underneath and come up clear when I select a new date and time. I would then like the set/rep form underneath Exercise and it to be empty when I select a new Exercise.

So let's say I do 3 sets of Bench press then I'll have:

Bench Press
Set1 Reps 10 Weight Used 200
Set2 Reps 7 Weight Used 220
Set3 Reps 5 Weight Used 250

Then I move onto Shoulder Press

Shoulder Press
Set1 Reps 10 Weight 60
Set 2 Reps 8 Weight 70
Set 3 Reps 7 Weight 80

So my sets will repeat with every different exercise everyday. I usually do 3 to 5 sets of one exercise then move onto another exercise for a total for 3 to 5 different exercises a workout and one workout per day. This is why my set ID can't be a primary key unless I put it in its own table, right? Also the exercise ID can't be the primary of the main table or I will be limited to the amount of dates I can use, correct? I am a little confused I guess being a newbie and all. Thanks
Reply With Quote
  #8 (permalink)  
Old June 9th, 2008, 04:59 PM
AOG123's Avatar
Lightning Master

 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 75
Thanks: 6
Thanked 20 Times in 15 Posts
Rep Power: 1
AOG123 is on a distinguished road

Awards Showcase
Microsoft Access 
Total Awards: 1

Default

Have a look through,.. and see if you encounter any limitations,.

In regards to the set id being a primary key,. it can and really should be. Noticed how i called the "tbl_fixed_sets" and the set id is a primary.

This stops duplicate sets being entered in the fixed sets table.

But,.. it doesn't stop multiples of this id being entered into the tbl_main_routine.

If this does't help,.. come back,.. and we'll look at a work around.

Comments on this post
jmurrayhead agrees: indeed
Reply With Quote
  #9 (permalink)  
Old June 9th, 2008, 05:08 PM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 73
Thanks: 18
Thanked 20 Times in 15 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

Heh, I had one ready to post as well.... may as well post it too....

Here is the sample I had:
Attached Files
File Type: zip exerciseII.zip (22.8 KB, 12 views)
Reply With Quote
The Following 2 Users Say Thank You to sbenj69 For This Useful Post:
AOG123 (June 9th, 2008), jchrisf (June 9th, 2008)
  #10 (permalink)  
Old June 9th, 2008, 05:19 PM
AOG123's Avatar
Lightning Master

 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 75
Thanks: 6
Thanked 20 Times in 15 Posts
Rep Power: 1
AOG123 is on a distinguished road

Awards Showcase
Microsoft Access 
Total Awards: 1

Default

@sbenj,.. nice,.

Jcrisf,

You have allot of things to review here,.. please note the handy feature for dblclick on times.

With all the information you've received i urge you to look into how the samples were set up.

Thanks and best regards,
Reply With Quote
Reply

  DeveloperBarn Forums > Databases > Microsoft Access

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Sponsored Links

ASP.NET Resource Index
a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer.

Free Web Directory
Including Chats and Forums Resources, Offer automatic, instant and free directory submissions.
URLZ Web Directory
URLZ Web Directory

Free Web Directory - Add Your Link
The Little Web Directory
Free Web Directory
Pegasus free web directory is a free directory organised by categories.

Web Directory & SEO Services
dirroot web directory


All times are GMT -4. The time now is 07:48 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 2008 DeveloperBarn.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46