Go Back   DeveloperBarn Forums > Databases > Microsoft Access

Sponsored Links

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
  #11  
Old June 9th, 2008, 05:45 PM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 84
Thanks: 20
Thanked 24 Times in 19 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

btw, jchrisf.....

If you have a moment it would be great to know how you got here.

You can sign in here ---> http://www.developerbarn.com/off-top...loperbarn.html

I'd like to say at this time, welcome aboard, and if you ever have a question to ask, feel free to do so, as we are more than happy to help.

Enjoy the samples and feel free to ask questions
Reply With Quote
Sponsored Links
  #12  
Old June 9th, 2008, 06:39 PM
Barn Newbie
 
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

Quote:
Originally Posted by sbenj69 View Post
btw, jchrisf.....

If you have a moment it would be great to know how you got here.

You can sign in here ---> http://www.developerbarn.com/off-top...loperbarn.html

I'd like to say at this time, welcome aboard, and if you ever have a question to ask, feel free to do so, as we are more than happy to help.

Enjoy the samples and feel free to ask questions
Thanks guys... I will definately study these examples and learn more about Access. I have big goals for Access in my life and look forward to learning all I can.

As for how I got here... I am not sure but can tell you sbenj69 that you were I think responsible I was at another access forum and you... I think linked to some examples here and I saw how helpful you and AOG123 were with actual examples so I knew this would be the perfect place to get help learning more about Access... So thanks a lot guys!
Reply With Quote
  #13  
Old June 10th, 2008, 01:39 PM
Barn Newbie
 
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

Ok... so I've decided to start with sbenj69's database and dissect it for learning. I am trying to create everything identical to yours so I understand what you did then do the same with AOG123's database... then when I know what's going on I will modify them to make my own. I have to admit, though these don't do exactly what I need them too they have a lot more tricks than I would have guessed even possible... Cool!

BTW, I think you two did this on purpose to force me to learn

sbenj69, I've created everything identical (I think) right up to the first form. I decided to create the form by hand and add the items as I go so I can see how you are doing things. My problem (I've attached my recreation) is that my uneditable MemberID and MemberName text fields don't repopulate with the correct info from the MemberName combo box. I might have to continue on and build the subform to find the problem by I thought I would stop here and asked so I don't miss something in this learning process.

Thanks for the help!
Attached Files
File Type: zip Exercise.zip (17.9 KB, 4 views)
Reply With Quote
  #14  
Old June 10th, 2008, 03:48 PM
Barn Newbie
 
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 found it:

Code:
Private Sub Combo6_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[MemberID] = " & Str(Nz(Me![Combo6], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
For the life of me I couldn't see the "Event Procedure" in the After Update when comparing the two. I've got mine working like yours so far so I will continue on.

I have to say that I understand the above code is putting a private sub command for the Combo6 box on after update, You are then defining a variable rs as an object... after that I don't understand what you are doing and maybe by my description above I didn't know what you were doing at the beginning?
Reply With Quote
  #15  
Old June 10th, 2008, 04:03 PM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 84
Thanks: 20
Thanked 24 Times in 19 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

well, originally, in the primary form, I just had the two fields.... memberid and membername. I decided to put a combobox that shows both values, but stores the member id value in the field, member id.

The code is automatically built by Access. To replicate this, create just an ordinary form with those two fields, (memberid, membername). Save it, reopen in design view. From your toolbox, use the combobox creator tool..... draw your combo-box, then click where it says "Find a record on my form based on the value selected in my combo box", select both fields to be shown, hide key field, then finish up the combo box. Voila!! It builds the code for you.

The code merely selects the first record specific to the value selected in the combo box. So, if I choose John Doe in the combo box, it opens the first record with John Doe in it.

Last edited by sbenj69; June 11th, 2008 at 12:50 AM.
Reply With Quote
The Following User Says Thank You to sbenj69 For This Useful Post:
jchrisf (June 10th, 2008)
  #16  
Old June 10th, 2008, 04:54 PM
Barn Newbie
 
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 sbenj69 (btw.. I was born in 69 too )

Well, I am glad I figured it out on my own using the properties and code of the database because I learned a lot more about the process.

I had a lot of questions about this database but I just finished adding everything you did by hand copying all your property and code settings and it works just like yours. Now I don't have any questions because I understand how it works. Now on to AOG123's example. Thanks for the examples.. it is teaching me a lot.

BTW, I have been using Alison Balter's Access 2002 Desktop Development and a Que 2002 Access book that is not in front of me now so I don't know the title or author. Is there another or better book out there for Access 2002 (which I use)?
Reply With Quote
  #17  
Old June 10th, 2008, 06:56 PM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 84
Thanks: 20
Thanked 24 Times in 19 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

Personally, I started developing databases about 1.5 years ago. I use Access 2003, but I don't find a whole lot of difference between it and Office XP/2002. I did purchase a book in the beginning, Step by Step Access 2003, released from Microsoft, which runs about $25 US.

Really though, I learned a lot from the tutorials I stickied at the top of this forum, and most of it by asking questions - something I still do. I had a little bit of a head start in learning vba, since it is so similiar to the original BASIC compiler from the 70s/80s. Basically, I am still pushing myself to learn new things.

I merely enjoy giving back to these forums, what I have received. I have no doubt, that in a few months you will be answering questions as well. You seem to have a good logical train of thought which allows you to follow the code. As I stated before, don't hesitate to ask if you get hung up on something. Also, in the code examples, also stickied in these forums, you can receive a plethora of information.

It is our goal to help as much as possible. Usually, our examples will parallel the questions asked, only in much simpler form, concentrating solely on the problem at hand. It's easier to only include all of the objects that will be in play in obtaining a desired output. That way, you aren't sifting through a bunch of queries, tables, or forms that have nothing to do with the solution, making it easier for you to see the solution.

And yes, sometimes, we like to add a couple of "extras" for asthetic reasons or to speed up a form's data entry.

A neat little trick you might want to try with that sample would be to change the subform to a continuous form, raise the start and end time fields to look like buttons, change the update from on double click to on click. Hide the subform until a person is selected who is doing the workout.

Here is the same database, slightly modified:
Attached Files
File Type: zip exerciseII.zip (22.2 KB, 4 views)
Reply With Quote
The Following User Says Thank You to sbenj69 For This Useful Post:
jchrisf (June 11th, 2008)
  #18  
Old June 11th, 2008, 11:58 AM
Barn Newbie
 
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 again sbenj69... I've learned more in the past 24 hours playing with your examples than through any book so far

I started to look at AOG123's example after I figured yours out but it was so different I thought I would customize yours so it fits my needs first while it is still fresh on my mind. Now that I have done that I will move on to his example... try to figure it out and customize it so it works for me.

I've enclosed the exercise database that I customized to work for my needs from sbenj69's examples. The only thing at the moment I would like the main form to do that I can't figure out is let me add a new Exercise (actually in the subform) that is not in the list. Any help with that would be appreciated.
Attached Files
File Type: zip My Exercise Database.zip (49.1 KB, 2 views)
Reply With Quote
  #19  
Old June 11th, 2008, 04:10 PM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 84
Thanks: 20
Thanked 24 Times in 19 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

Check out this thread:

http://www.developerbarn.com/microso....html#post1766
Reply With Quote
  #20  
Old June 12th, 2008, 09:15 AM
Barn Newbie
 
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

Quote:
Originally Posted by sbenj69 View Post
Very cool! AOG has one similar to this in the database he posted here but a little more complex and specific to that database. This one worked fine although it was a bit of a challenge to me to configure it to work with my table and fields.

I finished programming your exercise database AOG and did everything by hand except the calendar because it looked very tedious but that is the only part I am having errors on now so I can see that I need to redo it by hand to figure that out. This one was very challenging and will probably take me a little time to configure it in a way that I will want to use it. This is very good stuff guys and I appreciate the tutorials and help!
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


All times are GMT -4. The time now is 12:28 PM.



Content Relevant URLs by vBSEO 3.2.0