Update a Table Field Whenever the Record is Changed using a Data Macro in Microsoft Access
ฝัง
- เผยแพร่เมื่อ 5 ก.ย. 2024
- In this Microsoft Access tutorial, I will teach you how to update the date that a record was last updated using a data macro. This runs at the table level. Use them sparingly, but they can be useful.
LEARN MORE:
599cd.com/Data...
PRE-REQUISITES:
Access Advanced 1: 599cd.com/ACA1
RECOMMENDED COURSES:
Access Advanced 6: 599cd.com/ACA6
BECOME A MEMBER:
TH-cam: / @599cd
or My Site: 599cd.com/THMe...
ADDITIONAL RESOURCES:
FREE Access Beginner Level 1: 599cd.com/Free1
$1 Access Level 2: 599cd.com/1Dollar
Donate to my Tip Jar: 599cd.com/TipJar
Get on my Mailing List: 599cd.com/YTML
Contact Me: 599cd.com/Contact
TechHelp: 599cd.com/Tech...
Consulting Help: 599cd.com/DevNet
Twitter: / learningaccess
en.wikipedia.o...
products.offic...
microsoft.com/...
KEYWORDS
access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, #fasttips, data macro, last updated, trigger, before change, update date when record changed
QUESTIONS:
Please feel free to post your questions or comments below. Thanks.
Best access teacher period.
Thanks
That was perfect. Exactly what i was looking for. Thank you!
Great teacher as all time Richard. Thanks a lot for your valuable lesson
My pleasure!
I went a step beyond this by creating a macro to track when a particular field in a table has changed. I created a child table to record the date the change was made to the field and to record the old field value. This worked fine for a while but my parent table eventually became corrupted. The fields that I was tracking changings too in the parent table were getting corrupted with special characters and different language characters. I disabled the macros and had to replace the parent table from backup data. I'm not 100% sure the macros were to blame but I haven't had any further corruption of data since. I had no idea that table level macros were so risky. Thanks for pointing that out in the video.
If you have split database, Where should it be placed? FE BE? Or both are work?
When splitting your database, you can keep the backend in the same folder as the front end, if it's not a security risk for your needs.
Though, best practice, for security, would be to save that backend in a separate folder, which could be a different drive, from the main front end. That drive, if accessed by more than 1 person, be the same to keep the flow of data, with less risk of corruption.
BE on a shared server folder. Unique FE copy on each workstation.
all thumbs up for the valuable lessons as always. Thanks a lot Richard for your hard work 👍
Welcome
Thank you, I’m such a fan of your videos! Does this work with a split fe be? If so, do we do the macro on the be?
Data macros are stored in the table, so put them wherever the table is located.
Try it Yourself: 599cd.com/Try
Lovely.... Never knew such things exist
Glad you like
Awesome!!! 🤩 Wonder if it’ll work with an Environ(“Username”)
Not sure. Give it a try.
thanks
welcome
The "LastUpdated" field is also filled with the current date and time when the record is created (= not changed). How to solve this?
599cd.com/ASK
How I can save the attachment on shared folder on the access
599cd.com/Ask