Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-14-2019, 06:58 AM   #1
akika
Newly Registered User
 
Join Date: Aug 2018
Posts: 87
Thanks: 17
Thanked 0 Times in 0 Posts
akika is on a distinguished road
add last_updated_by and last_updated_date in form

hi
in access2016 form, i have 5fields (name, address, phone, email and comments) that read from table tbl_customer
how can i add the
last_updated_by (user that has login) and last_updated_date (date/time)fields.

akika is offline   Reply With Quote
Old 08-14-2019, 07:00 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 3,631
Thanks: 38
Thanked 885 Times in 868 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: add last_updated_by and last_updated_date in form

Are those two fields available from the same table where your other fields on the form are coming from? If so, you can go to the form's design view, click on Field List button on the Ribbon and then should be able to drag the fields you want to add from the list on to the form.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 08-14-2019, 07:03 AM   #3
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 27,808
Thanks: 13
Thanked 1,510 Times in 1,436 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: add last_updated_by and last_updated_date in form

The two fields must be added to the table and also to the query used as the RecordSource for the form. The fields do not have to be bound to controls unless you want the values to be visible to the user. If you bind these fields to controls, you MUST lock the controls so the user cannot update the values.

Then, in the Form's BeforeUpdate event:

Me.last_updated_by = Forms!frmLogin!txtUserID (or some other method if you don't use a login form)
Me.last_updated_date = Now()

__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump




All times are GMT -8. The time now is 01:06 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World