Column History Append Only not Working

Modify_inc

Registered User.
Local time
Yesterday, 22:05
Joined
Mar 25, 2013
Messages
20
I just want to create a history of my notes in each of my records.

I have spent all day, and I feel I am no closer to that goal.

Searching the net, I found I could use the Column History function using the Append Only value. I thought, well this will work for now,and it should be straight forward. Now two hours later, I'm getting desperate.

=ColumnHistory([RecordSource],"Comments","[ID]=" & Nz([ID],0))

This is the command that is plastered all over the internet. Yet I have changed, it, modified it, and nothing but #Name?, #Size!, #Errors is all I ever get.

Can someone please enlighten me how to properly use this function/command?

Here is what I have:

Table: ClientInformation - This table has the 'Notes' field, which is set to 'Long Text' for Data Type since Access 2013 doesn't use memo type anymore. (I hope this isn't part of the problem)

Form: Main - Created a text box and named it, txtID (My understanding is this is where the above command is entered)

I also have the Notes field in the form

So I changed the above command from:

=ColumnHistory([RecordSource],"Comments","[ID]=" & Nz([ID],0))

to

=ColumnHistory([RecordSource],"Notes","[ID]=" & Nz([txtID],0))


I get confused about the ID variables, because there is two of them and I do not know code. Should I change both ID's to txtID? I have tried many different ways with no success.

If I do need to specify my table instead of using the default RecordSource, do I enter the table name ClientInformation with brackets and quotes or just quotes? I have tried many different ways with no success.

I also found this in a forum, and it is similar but different from the above command. Should note, it did not work for me either.

=ColumnHistory("MemoFieldName", "TableName", "ID=" & [ID])

"Where MemoFieldName is the name of the memo field, TableName the name of the table containing the memo field, and ID the name of the primary key field of this table (which should be available in the Record Source of the report)."

It says to use the primary key of the table. In that case, I would use ClientID for ID instead of txtID, since ClientID is the primary key in my ClientInformation table, but then I don't know which ID to substitute since there are two ID's. I tried multiple ways with no success.

Hope someone more knowledgeable than myself can point me in the right direction.

Thanks!
Mike
 
Take a look here:

In your code you need to replace the [RecordSource] with a table name, I suppose "Comments" and [ID] are valid field names in your table.

Thanks, but I have already been there, and their example uses VBA code. The above command is suppose to just work by placing it in an empty text box in your form. You mentioned the RecordSource needs to be changed to my table, but everyone that has it working says you leave it as it is, if your RecordSource is already included in your form,which mine is. But as I mentioned in my post, I tried substituting 'RecordSource' with the table 'ClientInformation' with no success. Though I'm not certain of the syntax: Do I use quotes and brackets, just quotes, just brackets? I have tried many different ways with no success.

No, 'Comments' and 'ID' are not valid field names in my table. As I mentioned in my post, I substituted 'Comments' with 'Notes' and 'ID' with 'txtID'. But there are two ID's in the command, do I change both ID's to txtID, or just one of them? I've tried many different ways also with no success.
 
I've made a small sample for you in the attached database, open the form and hit the button "Show History".
I think it is the easiest way to answer your questions and for you to get rid of you confusions. :)
 

Attachments

Users who are viewing this thread

Back
Top Bottom