473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Dates - initial and modification

3
I am creating a sales tracker for work and I am trying to have it so for each sales form I can have an initial entry date and a modification date. Is there a way to lock the initial entry date so that it won't change after the initial entry and have the modification date change every time information is updated?
Jul 28 '10 #1
3 1547
hype261
207 100+
@Kish
Generally what I do is hook into the before_update event for the form and when the form is updated I set the modification date gets Date().
Jul 28 '10 #2
missinglinq
3,532 Expert 2GB
In keeping with hype261's suggestion:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_BeforeUpdate(Cancel As Integer)
  2.  If Me.NewRecord Then
  3.    Me.OriginalEntryDate = Date
  4.  Else
  5.    Me.ModificationDate = Date
  6.  End If
  7. End Sub
Welcome to Bytes!

Linq ;0)>
Jul 29 '10 #3
Kish
3
Thanks for the help guys. I'm new to Access and am still a bit confused but I think I figured it out.
Jul 29 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: David Gray | last post by:
Greetings all, Quick newbie type question: I would like to be able to trap non-numerical data entered into a textbox via CTRL+C and/or Shift+Insert. I realise that this data can be...
11
by: Peter Pfeiffer | last post by:
I've written several scripts that have "while" blocks which increment a date by one day if the date does not match one of a group of dates. However, sometimes it apparently steps out out the while...
8
by: netsurfer | last post by:
Hi: Have a question on making the date automatically filled in by what the user enters in by the date at the top. The date entered at the top would most likely be on a Wednesday then I need...
22
by: mike | last post by:
If I had a date in the format "01-Jan-05" it does not sort properly with my sort routine: function compareDate(a,b) { var date_a = new Date(a); var date_b = new Date(b); if (date_a < date_b)...
10
by: malv | last post by:
I am involved in a major scientific algorithm design problem in which simulation of the underlying physics and visualization play an important role. Algorithm adaptation from run to run often...
7
by: Sven Schwyn | last post by:
Hi Many people are asking how to automatically update columns containing a modification date on updates. I'm wondering if the only solutions in the current pgsql really are... - adding...
1
by: Saso Zagoranski | last post by:
Hi! This is not exactly a C# question but I don't know where else to post it... I'm making an application where the user keeps track of it's art collection... I'm also trying to implement a...
1
by: Juan Romero | last post by:
Guys, I am reading file information from disk using the System.IO.File object. This is what the operating system is displaying on Explorer: File Name Modified...
3
by: DThreadgill | last post by:
I'm trying to import data from Excel into an Access table using VBA. I can't do the Import file because the dates on the spreadsheet are convaluted. Hence, my dilemma. When viewing the spreadsheet,...
0
by: nichele | last post by:
Hi all, for troubleshooting purpose, I would like to add to all my tables (and for all records) the creation and modification timestamp fields. Do you know if this is a common practice ? Do you...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.