Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25

    Columns History - Comments - Issue for football database form

    Hi,
    This is related to this post;
    https://www.accessforums.net/showthread.php?t=59462

    Basically, I have some issues with the Comments field and History of the comments in the Student Details form




    It displays the error .... I would really appreciate if someone knowledgeable can have a look and correct the code, I believe one line of code:
    Code:
    =ColumnHistory([RecordSource],"Comments","[ID]=" & Nz([ID],0))


    the comments are not updating, as in the template i downloaded from somewhere.
    Click image for larger version. 

Name:	errordatabasecommentshistory.jpg 
Views:	63 
Size:	136.0 KB 
ID:	30192
    My soccer database can be downloaded from here :

    http://members.iinet.net.au/~safetma...AllYears.accdb

    Thanks in advance.

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Code:
    =DLookUp("Comments","Students","[ID]=" & Nz([ID],0))
    Reverse positions of "comments" and "students" and change to a Dlookup.

  3. #3
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Thanks, it does the job but not as I really wanted,
    The aim is to have all these comments accumulating, something like the players diary , history ...
    like this in this template home inventory list from MS
    Click image for larger version. 

Name:	homeinventorylist.jpg 
Views:	62 
Size:	175.0 KB 
ID:	30197
    Much appreciated if you or someone make this code works for me.

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Code:
    =ColumnHistory([RecordSource],"Comments","[ID]=" & Nz([ID],0))
    This doesn't display because it doesn't look like there is a function named "ColumnHistory".

    Is this what you are wanting to do?
    Click image for larger version. 

Name:	Comment1.png 
Views:	63 
Size:	139.0 KB 
ID:	30209

    I had to re-arrange a few controls.

    I added another table "StudComments" and linked it to the "Students" table. Created a sub form for the comments, added two unbound controls for the comment date and message, added a button to append the comment.

  5. #5
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Hi Steve,
    This look like exactly what I need. I can confirm it once I see it in action. At the end of the day, doesn't matter how the "diary" will be composed, what is important is that information is there and that code is working, information is searchable and sort of "unchangeable, e.g. authentic.
    I am planing to add some more "fancy stuff" , links towards the players photos and videos folder .... also some electronic PDF docs "infringements, awards etc." ...
    Like records Management system ( HPE TRIM) ...
    Any chance that you can please send the database / attachment working code to zenica@iinet.net.au ? It would be much appreciated.
    Thanks for your effort.

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    OK, here it is. But I have to say the dB needs work to fix the design.

    Having "ID" as the PK field in every table is, at best, confusing.
    For example, for the students table, I would use "StudentID_PK" as the PK field name.
    "Student" is what the table stores data about.
    "ID" indicates the field is an Autonumber type field
    "_PK" indicates it is the primary key field. In another linked table, I would use "StudentID_FK"; the FK indicates it is a foreign key field of type Long Integer.

    I tried to make some changes to the PK field names, but there are macros used and I was frustrated....... soooooo, I stopped!
    I never use macros, only code.



    Some suggestions:
    Use only letters and numbers (exception is the underscore) for object names.
    Do not use spaces, punctuation or special characters in object names.
    Do not use look up FIELDS, multi-value fields or calculated fields in tables.
    Do not begin object names with a number.

    The field "E-mail Address" has a dash and a space.
    The field "ZIP/Postal Code" has a slash and a space.
    The form name "Student Attendance" has a space in it.
    Attached Files Attached Files

  7. #7
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Steve, mate, thanks, but you won't believe, i cannot check this until tomorrow at work, the reason: i have my PC connected to TV and resolution is 1980 x 1080 or something... the form is not getting visible, the part where the comments area is (to add / save comments) is cut !! Grrrrrrr :-)
    I saw some codes for making the form to fit the resolution but i couldn't apply them.
    Will search again , so far this is the best place for MS Access database design.
    Thanks again. Click image for larger version. 

Name:	myviewbigscreen.jpg 
Views:	55 
Size:	121.1 KB 
ID:	30225

  8. #8
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Actually, it works fine after I shrink the form in design view and re-arranged the fields as per this screenshot....
    Forgive me, few questions:
    How to make the comments read only, e.g. not to be changed later on.. also how to sort them by the latest comment to be on top?
    Cheers
    Click image for larger version. 

Name:	workingfinenow.jpg 
Views:	58 
Size:	124.7 KB 
ID:	30226

  9. #9
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by BBUnited View Post
    <snip>
    Forgive me, few questions:
    How to make the comments read only, e.g. not to be changed later on..
    Close all forms
    Open the form "sfComments" in design view.
    Open the form properties dialog box.
    Click on the DATA tab
    Look for "Allow Edits" and change to NO.
    Close and save the form...... Ta-Da!!


    Quote Originally Posted by BBUnited View Post
    <snip>
    also how to sort them by the latest comment to be on top?
    Looks like they already are... Look at the query "qryStudComments". (or the form)
    Isn't the field "CommentDate" set to "Descending"???

    Wouldn't the latest be 22/03/2017???
    Even the image is showing
    22/03/2017
    23/03/2016
    4/02/2011



  10. #10
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Thanks, I fixed the "read only" part, will investigate further the date order.
    Cheers

  11. #11
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Another challenge: planing to do a lot of coding and database design this weekend, but i am stuck on this picture "in memoriam"
    The idea is that when click on NEXT Record, this picture appears "In Memoriam" indicated that the player is deceased.
    Also, it does not look nice the "User type" - it is always highlighted as on picture... how to fix this?
    Have a nice weekend.
    Click image for larger version. 

Name:	picturevisible.jpg 
Views:	54 
Size:	175.1 KB 
ID:	30253

  12. #12
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    If Status is stored in a table, remove the combostatus_beforeupdate event. Put that code in the Form_Current event like this:
    Code:
    sub Form_current
    blagus.visible = false
    If [Status] = "Deseased" then
        blagus.visible = true
    end if
    end sub
    If Student Details form has a query recordsource, be sure it includes Status.

  13. #13
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Also, it does not look nice the "User type" - it is always highlighted as on picture... how to fix this?
    When a form opens, the focus is set to the first visible, enabled control. What control would you like to receive the focus?

    You could use the Form_Open event to set the control focus to a different control.

  14. #14
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    Thanks, both suggestions done, work fine.

  15. #15
    BBUnited's Avatar
    BBUnited is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2016
    Location
    Australia
    Posts
    25
    And another question please, about adding the relationship "brother" or "father" ...
    Basically, we have a situation that a father and two sons were playing for our team, and all 3 of them are in the database. How can I make or create drop down menu (combo box?) or text box or any other field, something that will say, that this player is brother with player 13 and player 05 is father of both of them?
    In page Family?friends on top menu i intend to add this info somehow... So when user click to a link/button /menu Brother, the main/General page opens up with the brother's player's details.
    Can it be done and what would be the best way to do it to look nice?
    Thanks in advance.

Page 1 of 2 12 LastLast
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