I don’t know what I am looking for is possible or not…
I have table CustTracking: Fields – CustID, Exc_ID, AssignedDept,
AssignedUser, EmpIDCreated, EmpIDUpdated, Comments, FollowupDt, DateCreated,
DateLastUpdated
From above fields, some fields will be entered by user, but fields –
EmpIDCreated, EmpIDUpdated, DateCreated & DateLastUpdated will be updated
automatically.
I want to create forms from this table to add and edit data but for these
fields (EmpIDCreated, EmpIDUpdated, DateCreated & DateLastUpdated) I have no
idea about how to write the code for this.
This forms opens when login is successful. So
I can explain the logic:
EmpIDCreated: When Emp Log on to this form and enter new item first time,
that EmpID should be stored in this field.
EmpIDUpdated: When Emp changes/edit the item, and who edits last time, this
field should save log on user id
DateCreated: when the item is first time created (should update from
systemdate)
DateLastUpdated: date when the item is lastupdated (should update from
systemdate)
Thanks,
|
|
0
|
|
|
|
Reply
|
Utf
|
11/19/2009 8:30:01 PM |
|
kay wrote:
>I don�t know what I am looking for is possible or not�
>I have table CustTracking: Fields � CustID, Exc_ID, AssignedDept,
>AssignedUser, EmpIDCreated, EmpIDUpdated, Comments, FollowupDt, DateCreated,
>DateLastUpdated
>
>From above fields, some fields will be entered by user, but fields �
>EmpIDCreated, EmpIDUpdated, DateCreated & DateLastUpdated will be updated
>automatically.
>
>I want to create forms from this table to add and edit data but for these
>fields (EmpIDCreated, EmpIDUpdated, DateCreated & DateLastUpdated) I have no
>idea about how to write the code for this.
>This forms opens when login is successful. So
>I can explain the logic:
>EmpIDCreated: When Emp Log on to this form and enter new item first time,
>that EmpID should be stored in this field.
>EmpIDUpdated: When Emp changes/edit the item, and who edits last time, this
>field should save log on user id
>DateCreated: when the item is first time created (should update from
>systemdate)
>DateLastUpdated: date when the item is lastupdated (should update from
>systemdate)
The created date is trivial to do. Just set the table
field's DefaultValue to Now()
The code to set the last updated field needs to be in the
form's BeforeUpdate event procedure:
Me.DateLastUpdated = Now()
--
Marsh
MVP [MS Access]
|
|
0
|
|
|
|
Reply
|
Marshall
|
11/19/2009 11:55:23 PM
|
|
|
1 Replies
156 Views
(page loaded in 0.864 seconds)
Similiar Articles: I need to store the date a record was created, automatically ...I need to store the date and time a record was created, automatically. ... field to your table called Last_Updated ... Auto populate date in a ... to populate based on ... Auto populate date in a form - microsoft.public.access.forms ...Access stores dates as 8 byte floating ... org: Microsoft Access question: Auto-populate current date/time in a form?, created at ... 27:00 GMT with 1,302 bytes, last updated Windows 7 taskbar API problems - microsoft.public.vb.general ...... spreadsheet or Word document file created by the user. My Auto FE ... your users FEs and other files updated ... However I'm going to store the last date/time started of ... Problem with Vista: "Run-Time error '75': Path/File ...For example, an application may store a spell check ... from the parent) so that it cannot be accessed or updated? ... Management That document might be out of date what ... Insurance Certificates Database - microsoft.public.access ...(I still don't understand why it is better to store a ... agency that produces the certifcate) Cert Date (date ... very well for us and was not being aggressively updated ... trouble with 640GB laptop drive - microsoft.public.win98.gen ...There is an updated Fdisk.exe, which has a file date of May 2000. ... It's amazing how many people store their ... LAN not auto-connecting on startup wiht ... Store the date and time when a record is modified - Access ...When the form is used to modify a record, the macro stores the date and time in the ... If you only want to capture the date and time that a record is created, just add ... HOWTO - Stored Procedure Support - DB Apache Project - Welcome to DB... AUSER_CREATED, AUSER_UPDATED ) RETURNING ID, USER_CREATED, DATE_CREATED, USER_UPDATED ... returned by the CUSTOMER_PKG.ADD stored procedure and store the value in ... How to create a TIMESTAMP/DATETIME column in MySQL to ...... to take the current time value when a row is created or updated. ... column in a table can be configured for Auto-Update ... operating timezone into UTC (Unix Time) and store it ... Row_Number() function in SQL Server 2005 — DatabaseJournal.com... FROM EMPLOYEE ORDER BY EMPID This query created a ... Updated: Loading BIDS on Enterprise... kappa02: 2: July 19th, 05:32 AM: Adding Next Appointment Date SQL Server Statistics - SQL Server Thoughts from the Field - Site ...... or JOIN clause causes statistics to be created or updated ... by sampling the column values (using auto ... object exists, the statistics object is updated if it is out of date. 7/21/2012 7:18:32 PM
|