473,320 Members | 1,713 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,320 software developers and data experts.

date/time stamp

I have a textbox on my form label date/time. I also added a date/time
column to my table as well. The table already contains records before
the date/time column was added. How do I setup a date/time stamp to
that textbox or column for any changes that is made to any records?
I've added =Now() on the AfterUpdate properties of the text box, but it
is only adding a stamp if new records are added not when there are just
changes made. Please help. Thanks.

Mar 9 '06 #1
3 6390
<fo*******@martecgroup.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
I have a textbox on my form label date/time. I also added a date/time
column to my table as well. The table already contains records before
the date/time column was added. How do I setup a date/time stamp to
that textbox or column for any changes that is made to any records?
I've added =Now() on the AfterUpdate properties of the text box, but it
is only adding a stamp if new records are added not when there are just
changes made. Please help. Thanks.


In the "before update" event of the form:

Me.txtMyTextBox = Now()

HTH - Keith.
www.keithwilby.com
Mar 9 '06 #2
When I add that in the before update I get a "you can't go to a
specified record" box that pops up. Only option is to click "ok" and
it goes back to the same form with the same record. I do have a save
record button on the form where it asks the user if they want to save
the record and move onto the next or cancel. If that helps clear things
a bit. Thanks.

Mar 9 '06 #3
Keith's advice is correct. Remove what you entered in the textbox's
AfterUpdate. Set the textbox's Locked property to Yes or Visible property to
No to prevent the user from manually editing this time. Set the
ControlSource of the textbox to the field you want to store the date/time
in. Make sure you add this field to the query that is supplying the data to
the form's RecordSource.

Once you do all of this and adjust the name of the textbox in the code that
Keith gave you to match the name of your textbox, it should work. Place the
statement after any statements that you may have in the form's BeforeUpdate
event that would Cancel the update (if any).

--
Wayne Morgan
MS Access MVP
<fo*******@martecgroup.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
When I add that in the before update I get a "you can't go to a
specified record" box that pops up. Only option is to click "ok" and
it goes back to the same form with the same record. I do have a save
record button on the form where it asks the user if they want to save
the record and move onto the next or cancel. If that helps clear things
a bit. Thanks.

Mar 9 '06 #4

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

Similar topics

5
by: akoper | last post by:
I have a table that is a project. Each record is a task in the project. One field in each record is a date/time stamp for when that task was completed. I need to be able to: 1) compute how much...
7
by: Don | last post by:
Hi all, With regards to the following, how do I append the datetimestamp to the filenames in the form? The files are processed using the PHP script that follows below. Thanks in advance,...
6
by: Mike Charney | last post by:
Is there a way to check a files date and time stamp from VBA in access. I have a need check a date stamp on a file that I am importing. Thanks in advance, Mike m charney at dunlap hospital...
5
by: Des | last post by:
I have to do an events calender for a church. The events display will be limited to that week. If someone went in today Wed 24th I want to display 21st to 27th. I dont want any code samples, just...
3
by: phried1 | last post by:
I have created a form and inserted the following tables: Date Entered Time Entered Date Modified Time Modified Essentially how and where can I have these dates and times recorded so when the...
1
by: Susan Bricker | last post by:
Greetings. I have a report (actually all of my reports in an MDB) that I want to date/time stamp at the bottom. Previously, I had used the builtin function of Now(). I thought that would give...
4
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form...
1
by: 6afraidbecause789 | last post by:
Hi - I am using a Date/Time Picker popup form for users to choose a a date and time for use on a separate entry form. The date/time on the entry form is actually entered automatically as a...
16
by: W. eWatson | last post by:
Are there some date and time comparison functions that would compare, say, Is 10/05/05 later than 09/22/02? (or 02/09/22 format, yy/mm/dd) Is 02/11/07 the same as 02/11/07? Is 14:05:18 after...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.