Time Stamp when record is changed

There can be issues with using single quotes around names when dealing with someone called O'Leary. Best to use chr(34) to insert double quotes.

Also, why not just set the timestamp to Now() rather than formatting a variable. And the ProductID is likely to be a long integer, not an integer.

Apologies for being pedantic - I just like avoiding possible future problems.
 
Thank you so much Pat.. I understand this.. I also did not know that you will be able to update fields just by using Me.Field_name.. I though that can be done only for visible fields.. or fields that are on the Form.. That is the only reason I used UPDATE. after you mentioned I tried using it.. Works great.. Thanks once agin for opeing my eyes..

A bit late to the party but where Me.Field_name (Me dot) can only be used to update fields which on the form whereas Me!Field_name (Me bang) can also be used to update fields in the underlying recordsource regardless of it being bound to a control on the form.

It's apparently a bit more complex than that but that is the simplistic view.
 
Hey Nigel, I am so glad I have made good progress.. LOL.. I did not know anything about Bang and Dot then, now I do.. It's always good to hear from you, thanks for sharing.. :)
 
what about if I'm not using forms, but manually updating fields
 
You can also manually change the Timestamp field as well, but with the Jet engine in Access databases, there is no direct trigger available at the table level to lead to automating field data changes.

Another reason for only changing data through forms where business rules can be enforced.
 

Users who are viewing this thread

Back
Top Bottom