PC Review


Reply
Thread Tools Rate Thread

Automatic date

 
 
janelgirl
Guest
Posts: n/a
 
      28th Apr 2010
I need to add a field that is the current date to a table, but the date needs
to be updated automatically to always equal the current date. In Excel, this
was easily done with the "TODAY" function, but this isn't working in Access.
When I use "Date()", it returns the date that the record was created, but
does not update to the current date as time passes. In other words, if it
was created on 4/22/10, when I open the table on 4/28/10, I need that field
to read 4/28/10, even though it was created on an earlier date. I hope this
makes sense. Any help is greatly appreciated! Thanks!
 
Reply With Quote
 
 
 
 
Daniel Pineault
Guest
Posts: n/a
 
      28th Apr 2010
Firstly, you should not ever be working directly in your tables, but rather
through a form.

Once you have a form setup you could add a current event to your form to
automatically update your control value.

Me.ControlName = Date()

--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"janelgirl" wrote:

> I need to add a field that is the current date to a table, but the date needs
> to be updated automatically to always equal the current date. In Excel, this
> was easily done with the "TODAY" function, but this isn't working in Access.
> When I use "Date()", it returns the date that the record was created, but
> does not update to the current date as time passes. In other words, if it
> was created on 4/22/10, when I open the table on 4/28/10, I need that field
> to read 4/28/10, even though it was created on an earlier date. I hope this
> makes sense. Any help is greatly appreciated! Thanks!

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      29th Apr 2010
On Wed, 28 Apr 2010 13:37:01 -0700, janelgirl
<(E-Mail Removed)> wrote:

>I need to add a field that is the current date to a table, but the date needs
>to be updated automatically to always equal the current date. In Excel, this
>was easily done with the "TODAY" function, but this isn't working in Access.
>When I use "Date()", it returns the date that the record was created, but
>does not update to the current date as time passes. In other words, if it
>was created on 4/22/10, when I open the table on 4/28/10, I need that field
>to read 4/28/10, even though it was created on an earlier date. I hope this
>makes sense. Any help is greatly appreciated! Thanks!


A table should contain only real, static data. You can display today's date in
a Query, or in the control source of a textbox on a Form or Report, using the
Date() function. You cannot do so (and should not do so, because no such
field should exist!) in a Table.
--

John W. Vinson [MVP]
 
Reply With Quote
 
janelgirl
Guest
Posts: n/a
 
      29th Apr 2010
Thanks for the help! On a side note, why should I not work directly in my
tables? I am new at this, so I don't want to do anything that would create
issues down the road.

Thanks - janelgirl

"Daniel Pineault" wrote:

> Firstly, you should not ever be working directly in your tables, but rather
> through a form.
>
> Once you have a form setup you could add a current event to your form to
> automatically update your control value.
>
> Me.ControlName = Date()
>
> --
> Hope this helps,
>
> Daniel Pineault
> http://www.cardaconsultants.com/
> For Access Tips and Examples: http://www.devhut.net
> Please rate this post using the vote buttons if it was helpful.
>
>
>
>

 
Reply With Quote
 
janelgirl
Guest
Posts: n/a
 
      29th Apr 2010
This really helped - Now I see what you mean by not having data in your
tables that changes. That clears up a lot of things for me. :-)

"John W. Vinson" wrote:

> On Wed, 28 Apr 2010 13:37:01 -0700, janelgirl
> <(E-Mail Removed)> wrote:


>
> A table should contain only real, static data. You can display today's date in
> a Query, or in the control source of a textbox on a Form or Report, using the
> Date() function. You cannot do so (and should not do so, because no such
> field should exist!) in a Table.
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enter a date and then apply automatic date? Ruth_Rob Microsoft Word New Users 2 1st Jan 2009 04:45 PM
automatic date icon in H&F producing an incorrect date Lucille Microsoft Word Document Management 2 9th Dec 2008 03:11 PM
Automatic date chiquita Microsoft Word Document Management 3 15th Mar 2008 08:06 AM
date/time automatic update is off but date still updates. =?Utf-8?B?am9jYXNhbQ==?= Microsoft Word Document Management 2 11th Feb 2006 03:50 PM
Help with date automatic date problem (probably very simple)... Dave E Microsoft Excel Misc 7 2nd Dec 2003 10:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:03 PM.