Solved Log what field was changed on a form

Just in case anyone cares, the author of that link article written back in 2011 was YKW.
Colin,
That is what I posted? He was touting it on UA a few days back. :)
 
It's not that bad ... other than the active screen and all this Active stuff, which of course is totally unreliable, but see my last post - I actually created a test database and utilized it. I think the answer to this whole thread lies in my last post, believe it or not.

I was also somewhat confused until I remembered it was inserting line breaks - adjusting the row height of the table in datasheet mode, I then realized it actually was putting all the changes in.
 
@Isaac - good point.
 
Another style pointer... why did you choose to make this a function? There are only two times when you need to make something a function. First, when you intended to return a value - but you don't return a value here. Second, if you intended to run this in MACRO context, because a MACRO requires a function for its RunCode entry-point name. Any other time, what you wrote might as well be a SUB.
@The_Doc_Man
Not the O/P's fault. He is just using what was in the link, which as Colin mentioned was supposedly meant to be written by YKW :)
 
@Gasman - true, I should remember that when YKW claimed to know something, he wasn't always correct.
 
Colin,
That is what I posted? He was touting it on UA a few days back. :)
It was indeed...which is what reminded me. :rolleyes:

BTW 'functionally' it doesn't make any difference if a sub is written as a function.

A third reason for doing just that is so it can be run directly from the immediate window
Indeed some developers only ever write code as functions.
However its not a policy I subscribe to
 
It's not that bad ... other than the active screen and all this Active stuff, which of course is totally unreliable, but see my last post - I actually created a test database and utilized it. I think the answer to this whole thread lies in my last post, believe it or not.

I was also somewhat confused until I remembered it was inserting line breaks - adjusting the row height of the table in datasheet mode, I then realized it actually was putting all the changes in.
I did this and YOU are correct it has all the changes - thanks so much! :)
 
I did this and YOU are correct it has all the changes - thanks so much! :)
Glad to hear it's working. I strongly recommend considering Doc Man's suggestions.
Good luck with the project
 
For an audit example using data macros see this. It is not dependent on forms and form events. It will handle changes made via table, query, form or vba.
 

Users who are viewing this thread

Back
Top Bottom