Column History

David92595

Registered User.
Local time
Today, 15:45
Joined
Jun 28, 2011
Messages
44
I am trying to get column history to work in my database. I've read more posts than I care to count online with little to no luck.

I know the CODE is:
=ColumnHistory([RecordSource],"Comments","[ID]=" & Nz([ID],0))


But after I change our comments field to memo (already was) and change to append only. It still does not work. I either get a error message of “#error” or “#Name?” in the unbound text box where the results should be.

I've also tried it in one of Microsoft templates, where it works fine.

I am utterly confused. Any help would be greatly appreciated.

David92595
 
From the code you've presented it looks as if you are missing a Domain Aggregation function, DLookup() perhaps :confused:
 
Don't run 2007/2010, so I can't do any testing with ColumnHistory() but the most common mistake with anything having a Where Clause is not having the correct syntax for the Datatype being used. Not sure what you're doing with Nz() in this particular case, so I'll leave that out, here, but

"[ID]=" & [ID]

is only correct if the ID Field is defined as a Number Datatype, but not if it's defined as Text.

If ID is a Text Datatype, you would use

"[ID]='" & [ID] & "'"

This could possibly account for the fact that it works in the Access template, where ID is probably Numeric, but not in your own app.

Linq ;0)>
 
Last edited:
:eek: My bad, apparently it's a new function implemented since the '07 Version .

There is a good discussion in this thread, with a suggestion for a work around for pre '07 Access
 
missinglinq

Thank you for pointing that out. Our ID is a text field, which would defiantly alter things a bit. I've tried your code snippet and it still is not working, but if you have any other idea's your defiantly on the right track.
 
Last edited:
Hi,

Has anyone found a solution to this problem? I'm currently facing the same problem when my ID dataype is text.

Any help, very welcome!

Rgds/Lates
 
I don't think the perfect solution was figured out. But I was able to find some kind of a work around.

I created a unbound combo box with an action after update with a macro.
Action: SearchForRecord
Argument: ="[ID] = " & Str(Nz(Screen.ActiveControl,0))

This has worked for my users...

David92595
 

Users who are viewing this thread

Back
Top Bottom