Results 1 to 3 of 3
  1. #1
    huv123 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Posts
    6

    ColumnHistory Code


    Access 2007 hsa added a nice function that allows you to record notes using a memo field and appendonly and two fields Comments (this is where you enter the note) and txtComments (this is where the history appears). This can be seen in many of the Access templates call Call Tracker.

    A glitch of sorts though is when a person's note is only viewable in the history field (i.e. txtComments field) after a form is closed and reopened i.e. there is no "add note" command button or similar that allows an individual to see that their note has been entered into history in real time. Another issue is that when you reopen the form, the last comment entered into the txtComments field is still there. I tried to set the value of the Comments field to null on form close but then that added a timestamp to the history field.

    Can anyone think of suggestions about how to get around these things?

    I know this isnt the right code but I want to do something like

    OnClick of command button or AfterUpdate (which ever can be done)
    If Not IsNull(Me.Comments) Then
    Me.txtComments.Requery
    Me.Comments.Value = Null
    End If

    So basically what happens is that where a person enters a note, and then clicks the button (or moves away from field) the txtComments field adds the new note to the history, and then sets the comments field to null. But because the field is now null, nothing will happen on form close (i.e. the null note wont be appended to the txtComments field.

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    I'm not quite sure I follow so this may not be what you are looking for, but could you run some "INSERT INTO" SQL on the lost focus event of the txtComments object?

  3. #3
    huv123 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Posts
    6
    I think you will understand better if you look at the template - it should be available by opening access and going to local templates --> business

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 01-19-2011, 04:20 PM
  2. Word code in Access - How to modify my current code
    By Alexandre Cote in forum Programming
    Replies: 0
    Last Post: 11-15-2010, 08:26 AM
  3. Code in combobox, code in text box
    By float in forum Forms
    Replies: 3
    Last Post: 09-29-2010, 07:12 AM
  4. Access 2003 code vs Access 2007 Code
    By ralphjramirez in forum Access
    Replies: 5
    Last Post: 11-23-2009, 12:33 PM
  5. =columnhistory
    By botts121 in forum Programming
    Replies: 1
    Last Post: 07-06-2009, 07:26 PM

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