Solved Log what field was changed on a form (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 10:07
Joined
Sep 21, 2011
Messages
14,050
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. :)
 

Isaac

Lifelong Learner
Local time
Today, 03:07
Joined
Mar 14, 2017
Messages
8,738
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.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:07
Joined
Feb 28, 2001
Messages
27,001
@Isaac - good point.
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:07
Joined
Sep 21, 2011
Messages
14,050
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 :)
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:07
Joined
Feb 28, 2001
Messages
27,001
@Gasman - true, I should remember that when YKW claimed to know something, he wasn't always correct.
 

isladogs

MVP / VIP
Local time
Today, 10:07
Joined
Jan 14, 2017
Messages
18,186
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
 

Number11

Member
Local time
Today, 10:07
Joined
Jan 29, 2020
Messages
607
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! :)
 

Isaac

Lifelong Learner
Local time
Today, 03:07
Joined
Mar 14, 2017
Messages
8,738
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
 

jdraw

Super Moderator
Staff member
Local time
Today, 06:07
Joined
Jan 23, 2006
Messages
15,364
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

Top Bottom