Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Creating a Change Log

Status
Not open for further replies.

Bystander

Technical User
Sep 4, 2001
112
GB
Hi All,

I am trying to create a way of logging all changes to values on a form. It works perfectly with changes made via key strokes, however, it does not seem to work when I select lookup values.

Can anyone advise where I might be going wrong.


I have used the Changevalue event and the following code

method changeValue(var eventInfo ValueEvent)
var
oldVal,newVal Anytype
tcArc, TcId TCursor
endVar
TcId.open(":priv:__Identity.db")

oldVal = self.Value
newVal = eventInfo.newValue()
if newVal <> oldVal then
if tcArc.open(&quot;Track_Log.db&quot;) then
tcArc.edit()
tcArc.insertRecord()
tcArc.old_value=self.value
tcArc.new_value=newVal
tcArc.Ref=ref.value
tcArc.Changed_By=tcId.FirstName+ &quot; &quot; +tcId.Surname
endif
endIf
endMethod

Regards

Bystander

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top