473,897 Members | 3,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I automatically update a date field upon data entered into another field?

This concerns an Access 2002 (XP) database. There are two fields,
"Notes" (Memo Field) and "Notes Update" on a form (among others)
which I am concerned with here.

Problem: I need to be able to tell when people have added notes to a
record. (this database contains 6000+ records)

I want to set it up so that "Notes Update" is updated to the current
date whenever someone actually enters data into, or modifies data in,
the "Notes" field (but NOT when just browsing the information in the
field).
How I tried to solve the problem:

I added a field called "Notes Update" in a date format to the table.

I wrote a macro and put it into the "After Update" field of the
"Notes" Field on the form. The macro simply jumped to the "Notes
Update" field.

I put =Date() in the "On enter" property of the "Notes Update" field
on the form.

My hope was that an entry in the "Notes" field would trigger a jump to
the "Notes Update" field, which would then cause Date() to put that
day's date into the field.

I also removed the tab stop from the "Notes Update" field to prevent
anyone tabbing to the field and changing the date that way.

Unfortunately it didn't work.

Can anyone suggest the best way to get this to happen?
Nov 12 '05 #1
3 12977
Create a Text Box bound to your last-updated-on field, set the value to
either Date() or Now() as you prefer in the BeforeUpdate event for the
record. The event won't fire unless the record is being saved. Seems too
simple -- maybe I missed something?

Larry Linson
Microsoft Access MVP

"BlackFireN ova" <BF************ *****@myrealbox .com> wrote in message
news:8d******** *************** ***@posting.goo gle.com...
This concerns an Access 2002 (XP) database. There are two fields,
"Notes" (Memo Field) and "Notes Update" on a form (among others)
which I am concerned with here.

Problem: I need to be able to tell when people have added notes to a
record. (this database contains 6000+ records)

I want to set it up so that "Notes Update" is updated to the current
date whenever someone actually enters data into, or modifies data in,
the "Notes" field (but NOT when just browsing the information in the
field).
How I tried to solve the problem:

I added a field called "Notes Update" in a date format to the table.

I wrote a macro and put it into the "After Update" field of the
"Notes" Field on the form. The macro simply jumped to the "Notes
Update" field.

I put =Date() in the "On enter" property of the "Notes Update" field
on the form.

My hope was that an entry in the "Notes" field would trigger a jump to
the "Notes Update" field, which would then cause Date() to put that
day's date into the field.

I also removed the tab stop from the "Notes Update" field to prevent
anyone tabbing to the field and changing the date that way.

Unfortunately it didn't work.

Can anyone suggest the best way to get this to happen?

Nov 12 '05 #2
Larry:

I understand what you are saying about the text box, however I want
that date to be placed into the table, so a record of the updated date
is maintained. How do I get the date, once placed into the text box,
into the field in the table?

BFN
Nov 12 '05 #3
On 14 Oct 2003 20:45:47 -0700, BF************* ****@myrealbox. com
(BlackFireNova) wrote:

Presumably the field would be bound to the corresponding field in the
table.

-Tom.

Larry:

I understand what you are saying about the text box, however I want
that date to be placed into the table, so a record of the updated date
is maintained. How do I get the date, once placed into the text box,
into the field in the table?

BFN


Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2851
by: Dave [Hawk-Systems] | last post by:
Have a table with fnumber and number, both text fnumber is a phone number, format "8005551212" number needs to be the same number but in the format "(800) 555-1212" we currently run the following each time the list is updated; update pnums set number='(' || substring(fnumber from 1 for 3) || ') ' || substring(fnumber from 4 for 3) || '-' || substring(fnumber from 7 for 4); is there a way to statically set that number field so that it...
1
1525
by: Alienz | last post by:
I'm sure this is easy so if you have a sec pls help me out thx. Let say I have an inventory table and at the end of the month I want to move the info in 1 field (total end of month 1) into another field(total beg of month2) and then set the original field to 0. I know simple copy and paste in the table view can do this but It's not that efficient. what I did: I have created a query where total of end of month 1 is not null.
3
1840
by: euphorica | last post by:
I am making an inventory database. I have a field InventoryNumber where I put a specific code. The code always starts with a particular letter. I would like to fill in another field with specific information based on what that letter is. Can somebody show me how to do this? Thanks in advance.
8
3274
by: ivijayan | last post by:
HI. I have the following query:- How do i create field which updates its contents on the basis of data in another field in same record. especially if I have a Date field, how can I change the contents of Status field in the same record based on the date field. for ex:- - If the date is maximum the content in status should be "Current" - If there are 2 records for one ID and if the date field content is minimum the content in status...
4
7793
by: rcwoodard | last post by:
Hello all. I have a continuous form that I need to make a field invisible or visible depending on the selection in another field. I have tried using Form_Current() and the following code: Private Sub Form_Current() If VisitType = 3 Then Me.cboMonitor.Visible = True Else Me.cboMonitor.Visible = False End If
2
2571
by: dympna | last post by:
Hi can anyone suggest a fix for this... as I am a novice in access. I have created a training table with the following fields Employee Name - joe Training Received - Fork lift Date Received - 20/6/07 Certificate - yes What I want to create is a renewal date for this training, there are
1
1415
by: Kombz | last post by:
Please help -- been away from access for seven years and trying to set up a field that will return the data based on another field. i.e.: if they choose underwriter in the typeofdonation field, return the values Platinum, Gold, Silver. Any help would be much appreciated.
1
1893
by: MicMic | last post by:
I have a field called HyperlinkCopy and on exit I want the data in that field to be copied into ViewCertificate. Thanks
8
5398
by: mjvm | last post by:
Hi, I'm new to asking for help on the web, but haven't been able to find an answer to my question through Google - probably because I am not using the right words. In my form, I want to be able to make an entry in the 'worker' field, and then on a mouse click, it automatically puts today's date in the 'Date allocated' field. I have tried to build an event through expression builder, but that didn't work. I thought if i made the event on...
0
11250
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10939
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
8031
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7183
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5872
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6073
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4697
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4292
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3299
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.