Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    And another one, on the top part of the main form, orange coloured, where it is player's name (currently "UNTITLED" but in my database is showing the name, Surname and nick name, I am interested to show the players age, calculated.... E.g. Joe Bloke , Grimsby 62 Years .... (calculated on the basis : Today's date's year minus year he is born in ....
    or anything other way of displaying the players age.


    thanks

  2. #17
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    show the players age, calculated.... E.g. Joe Bloke , Grimsby 62 Years
    The age is easy. There are lots of functions to calculate ages. This is the one I use:
    Code:
    Function fGetAge(varDOB As Variant, Optional varAsOf As Variant) As Variant
       'Purpose:   Return the Age in years.
       'Arguments: varDOB = Date Of Birth
       '           varAsOf = the date to calculate the age at, or today if missing.
       'Returns:   Whole number of years.
       
       Dim dtDOB As Date
       Dim dtAsOf As Date
       Dim dtBDay As Date  'Birthday in the year of calculation.
    
       fGetAge = Null          'Initialize to Null
    
       'Validate parameters
       If IsDate(varDOB) Then
          dtDOB = varDOB
    
          If Not IsDate(varAsOf) Then  'Date to calculate age from.
             dtAsOf = Date
          Else
             dtAsOf = varAsOf
          End If
    
          If dtAsOf >= dtDOB Then      'Calculate only if it's after person was born.
             dtBDay = DateSerial(Year(dtAsOf), Month(dtDOB), Day(dtDOB))
             fGetAge = DateDiff("yyyy", dtDOB, dtAsOf) + (dtBDay > dtAsOf)
          End If
       End If
    End Function
    I have a module named "modCalculations" that I keep functions in.

    Usage:
    Code:
    =Nz([Student Name],"Untitled") & "  " & IIf(IsNull([StudAge]),"",[StudAge] & " years")
    (I really hate spaces in object names!!)

    I modified the query "Students Extended" - added the function to calc the age.
    I don't see where the "nick name" is stored.

    -------------------------------------------


    And another question please, about adding the relationship "brother" or "father" ...
    I modified the dB that I have (not the most recent version). Easier to show you than write....


    I created 3 tables: "MedicalInfo", "tblRelationships" and "tblRelatives".
    Created 3 sub forms: "sfMedicalInfo" and "sfRelatives".
    Added sub form "sfMedicalInfo" to the "Medical Information" tab.
    Added sub form "sfRelatives" to the student details form.
    Added age to the name on the student details form.

    I've been testing/using the student "dff fggg".....

    (hope this is close to what you are wanting.... )
    Attached Files Attached Files

  3. #18
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Steve,
    I tried your database, exactly as I wanted. I was very happy when I saw that father/brother relationship works and that many more records can be associated with the main player.
    Now I just need to apply this code to my database that I am working on every day, actually at work when i have time and also at home.
    You are becoming my favourite person :-) on this forum :-) , Davegri as well.
    Forgive me if I bother you few more times :-) with database/access issues...
    I just want to make this soccer club database to be perfect and authentic Records Management archive , the history of our club. In about a month we are having a sport party , trophy nigh actually and I want to show this on a big screen in a soccer club hall. For each player and then the 1 minute video preview goes on.
    OK, going now to modify my database.
    Have a nice weekend from Ozzie-land.

  4. #19
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Also, I would need a solution, an idea how to best present how many seasons this player had played with our club, something as 8 stars below his name ... or something similar .....
    Obviously, somewhere in this database must be a list of years starting from 1996 and also from 2001 till 2017 and then check boxes to indicate that player played in those particular seasons ... Something like "Circumstances" drop box, but multiple values that could be selected ////
    Basically, something that will tell us how many seasons this player played for the club, , like 2005, 2006, 2007, 2008 ...etc 2017 = totalling 10 seasons e.g.
    It would be nice to have that.
    Cheers

  5. #20
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Another metadata we would need for this historic memorabilia sport database:
    Besides players, we also have coaches (then coach and player) then Referees, President, secretary, vice president, Supporter ( there was even a group) , I am also planing to put a few players from other teams we played last 17 years .... (friends of the club) so, would would be a best solution to display this metadata, e.g. person from a club called Joe Bloke was player, coach, supporter, sponsor , so how to best display that, check boxes, ordinary text box? I want to make a strict distinction on the "click Next" to be instantly recognisable that this is a special category record, e.g. all form change the colour or some part only if this is a coach, or supporter or referee ...
    ..... I want to be able to assemble these metadata in a nice report as well.
    So, if anyone has time to show me few ideas, it would be much appreciated.
    Regards

  6. #21
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    I am having issues with combining the expressions for players names, surname and age with the expression Nickname(middle name)
    This one works OK,
    Code:
    =Nz([Student Name],"Untitled") & "  " & IIf(IsNull([StudAge]),"",[StudAge] & " years")
    But I also have a separate caption, expression for nickname/middle name, also works fine in a separate caption
    Code:
    =Nz([Middle Name],"Untitled")
    The final result is Joe Bloke 32 years, Bumbi (Bumbi is nickname, middle name) I want this to be Joe Bloke Bambi, 32 years ....

    tried few combinations, not working
    Code:
    =Nz([Student Name],"Untitled") & "       &"([Middle Name],"Untitled")"       " & IIf(IsNull([StudAge]),"",[StudAge] & " years")
    Anyone knows how the expression should look like in order to work?
    thanks

  7. #22
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    There are quotes and ampersands in the wrong places
    Try
    Code:
    =Nz([Student Name],"Untitled") & "       "  & NZ([Middle Name],"Untitled") & ",       " & IIf(IsNull([StudAge]),"",[StudAge] & " years")

  8. #23
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Thanks, the code now works beautifully.
    Cheers

  9. #24
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Hi, here is the question related to a "generated title" being shown across each page ???!!!
    Something I did not wanted to do..
    I do not know how to turn it off , so that it is shown only on one page or if i want it on another page in the different position ....

    This is what i mean:
    The composite title "name surname age" appears on ALL pages in my access database
    I want it to appear to the first one only and maybe some other , but not in all pages...
    Obviously I've done something wrong as in the previous versions of the database , it is not appearing..
    So if I delete it from one page it is actually deleted forever from ALL pages...
    Please advise.
    thanks


    Click image for larger version. 

Name:	accrossthefields.jpg 
Views:	13 
Size:	199.6 KB 
ID:	30371

  10. #25
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I don't have your full dB, but it looks like you have a tab control with the text box for the name/age placed on ALL of the tabs instead of only one tab.

    When you place a control on a tab control, you have to be careful to paste it on the tab you want.

    Make a copy of the dB. Be sure to experiment on the copy!!
    Click on the tab control, trying to click on a specific page.
    Cut the text box from the tab control, then try and paste it to one tab page. Keep doing this until you are comfortable pasting to one tab page.... then do it on the production dB.

  11. #26
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    From Australia to Alaska;
    Thanks you, I will try that, going to work place now.
    cheers

  12. #27
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Hello again,
    Need an advice regarding my soccer database;
    OK, I am 98% happy with a design for the Players profiles page in this access database, however, I need to have a page with a records about teams in the last 17 seasons;
    So, as per this screenshot, the page "TEAM-Players" will have a two photos, first team and reserve team, for 17 records/seasons but I also want somehow the names of the existing players to be listed there .... The existing players from the Table "Students" , from the Players Profiles database.....
    Final product should be a page with 17 records (two large photos of the teams (reserves and first teams) and a list of players (maybe drop down box) who played in these teams that year.... Also, if it is possible for user to click the name on the list and that players profile opens up with all the metadata, profile, that would be awsome...
    here are the screenshots ... So , is this somehow possible to be done? I tried some subform but i could not make it working ... Any solution would be happy....

    Click image for larger version. 

Name:	lookingforsolutions.jpg 
Views:	9 
Size:	178.3 KB 
ID:	30751 Click image for larger version. 

Name:	forum10october2017.jpg 
Views:	9 
Size:	215.5 KB 
ID:	30752

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 04-09-2015, 08:57 PM
  2. Need your comments regarding HR database
    By wrkadri in forum Database Design
    Replies: 2
    Last Post: 07-05-2014, 06:19 PM
  3. Replies: 5
    Last Post: 02-07-2012, 07:06 AM
  4. Comments History
    By stu in forum Forms
    Replies: 3
    Last Post: 11-15-2011, 06:43 PM
  5. Your comments on this school database system please
    By crazycat503 in forum Database Design
    Replies: 3
    Last Post: 05-24-2011, 09:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums