troubleshooting Question

Function that refers to oldvalue and field name - is it possible

Avatar of Rob4077
Rob4077Flag for Australia asked on
Microsoft Access
6 Comments2 Solutions513 ViewsLast Modified:
I would like to create a small function that will update a Memo field when values are changed but I am not sure how (or if it's possible) to carry a field's oldvalue and name into a function. The function I would like to write would need to be called by something like
and the function something like

Function fChangeLog(FieldName as Variant)
  If FieldName.value <> FieldName.oldvalue then
    me.History = Me.HistoryMe.History & vbNewLine & Me.LastEdited _
            & FieldName.Name & " changed from " & FieldName.OldValue _
            & " to " & FieldName.value
End Function

Is there a way to get this working?
Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros