Column History

Teady91

Registered User.
Local time
Today, 16:30
Joined
Jul 6, 2010
Messages
30
Hi All,
I am Currently in the process of designing an asset database for work. One of the features i am trying to design is a tracking feature whereby a history of the location of an asset is recorded and displayed in a form.
i have been using the column history function in access 2007. the way i have it set up is so that when a button is pressed the history is displayed in a text box.
i used the following code:

Private Sub PB_LocationHistory_BatteryTools_Click()

'Is Null Command

TXB_LocationHistory_BatteryTools.Value = Application.ColumnHistory("Assets", "Location", "ID=" & ID & "")

End Sub

when i press the button i get a runtime error 424

the strange thing is, i have used this exact code in another form on my database and it works fine...

please help :confused:

if anyone can suggest a better way to do this please do!

Thanks,

Teady
 
1. Is ID numeric or text?

2. I'm assuming it is numeric here:

TXB_LocationHistory_BatteryTools.Value = Application.ColumnHistory("Assets", "Location", "[ID]= " & Me!ID )

(you don't need to put & "" at the end of that.

3. If text then it would be:

TXB_LocationHistory_BatteryTools.Value = Application.ColumnHistory("Assets", "Location", "[ID]=" & Chr(34) & Me!ID & Chr(34))
 
Thanks,
This works for one of the forms, but when i duplicate it on another form i get a runtime error '2147467259 (80004005)' Method 'ColumnHistory' of object '_Application Failed'.

Any Ideas???

Cheers,
Teady
 
Does ID exist in the form's recordset? It needs to be in the recordset - it doesn't need to be on the form but does need to be in the recordset.
 
yea, it exists, i found the problem, thanks for considering it :)

very helpful!

Cheers,
Teady
 
Hi Teady,

I found your post that you have found the problem with Column History.
I have the same problem. would you let me know what was the problem?
Thanks

NK
 

Users who are viewing this thread

Back
Top Bottom