Automatic date

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!
0
Utf
4/28/2010 8:37:01 PM
access.gettingstarted 618 articles. 1 followers. Follow

4 Replies
702 Views

Similar Articles

[PageSpeed] 35

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!
0
Utf
4/28/2010 8:57:01 PM
On Wed, 28 Apr 2010 13:37:01 -0700, janelgirl
<janelgirl@discussions.microsoft.com> 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]
0
John
4/29/2010 5:51:53 AM
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.
> 
> 
> 
>
0
Utf
4/29/2010 1:24:01 PM
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
> <janelgirl@discussions.microsoft.com> 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]
> .
> 
0
Utf
4/29/2010 1:25:01 PM
Reply:

Similar Artilces:

Grouping dates in pivot table
I am pulling data from a SQL Server database to create a pivot table. Excel (07) is not recognizing the field as a date. This is a field I would like to group by in the pivottable. I am aware of all the techniques to convert this to a date field, but I am searching for an answer as to why XL pivot tables cannot consume the dates directly from a sql query. I have played with bringing the dates back in a number of differenent formats with no success. Any insights into this would be appreciated. Probably coming in as text and yuo may only need to copy an unused cell and paste sp...

how do i change dates on my calendar and keep my pics
Publisher doesn't support this. You would need to do it manually. -- Brian Kvalheim Microsoft Publisher MVP http://www.publishermvps.com ~pay it forward~ This posting is provided "AS IS" with no warranties, and confers no rights. "Bob T" <Bob T@discussions.microsoft.com> wrote in message news:68671977-F71B-444F-AE72-801D2B359FEE@microsoft.com... > ...

Date and Time
Is it possible to have a cell show the current date and time without entering it, like in word? Nick If you want the current date and time, updated whenever a calculation occurs, use =NOW(). If you want to enter the current date, without updating, press CTRL+; -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com chip@cpearson.com "Lord Of The Morning" <Not@aol.com> wrote in message news:vmjpgijrjvs5c5@corp.supernews.com... > Is it possible to have a cell show the current date and time without > entering it, like in word? > > Nick > >...

Date #9
One column has the date which I enter manually. If I type 15may it converts immediately to 15-May which is great. But how can I get the line to enter dates automatically? What I need is to enter one date (say, 20 May) and for all lines below to automatically add 1 day at a time, either at the time of starting the line, or even before in one go. Thank you very much JB You can use a formula, if you add the date in A2, in A3 put =IF(A2="","",A2+1) copy down as long as needed and format the cells the same way as in A2 -- Regards, Peo Sjoblom "JB"...

XL2007: Read-only automatically applies to .xlsm files
Hi There, I don't know if its me doing something that I shouldn't do, but when I open a file which is a "regular" .xlsx file it is opened regularly. But if it's a ..xlsm file, somehow it's opened as Read-only. So far I've used the method of using the Save As ... command from the office-menu, thereby replacing the old file. A bit cumbersome. Any explanationtions and/or work-arounds ? Greetings, Peter ...

Question about Date validation
Hi All, I'm working on a form for weekly data entry. I'd like to create a date field where the user will enter the date the week ends (ie week ending Friday, June 25th). Is there a way to write code so that Access will check that the day the user inputs is a Friday (and if not they will recieve an error message)?. I know how to program the error message pop-up box, but I have no idea how to write code to check if the date inputted is a Friday. Any help would be greatly appreciated! Thanks Use the WeekDay function If WeekDay(Me.DateField) = 6 Then MsgBox "Error" En...

Date Problem !!
hi there i have a big problem with the dates. i enter 09/10/2005 in a cell and it changes to 10/09/2005 !! big problem. it shows 10/09/2005 in the cell but 09/10/2005 in the formula bar !! 2 different dates very confusing is there a way of telling it to use just one kind ??? thanks -- cassy01 ------------------------------------------------------------------------ cassy01's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=780 View this thread: http://www.excelforum.com/showthread.php?threadid=473175 It's the same date, it's just formatted differently o...

Hiding tasks with due dates in the distant future
I'd like to display only my tasks for the next month or so. How can I filter out those that are in the distant future or recurring tasks that won't be due until next year or the year after? Hi, Goto the Tasks folder. Goto the Customize current view. Click on the Filter Button. Goto the Advanced Tab. Under define more criteria, clickon the Feilds and then select All Task Feilds and then select Due Date. Then under the condition Select Between and then in the Value enter the range of dates ( say 3/8/2004 and 3/10/2004 ). Hope this helps !!! With Regards, Sudharson.AN "Ambe...

dates
Hi there - I am a new user, have only started using excel 2 days ago but am really enjoying it. I have managed to create timesheets that automatically calculate the time spent on a project. Anyway, enjoying it very much. So, I have dates running down the left hand column (A), eg, 05.10.05. Currently I am inputting these by hand because if I drag that cell down it creates 05.10.06, 05.10.07 etc. I have messed with the 'custom' setting and changed it to 'dd.mm.yy' but this has not solved it. Any help much appreciated. By the way, it's excel 2001 for mac. Tom -- small ...

Automatically import/export workflow
Hello. I'm working on a redeploiment tool for CRM 3.0 pro. I mean a tool to automatically import all customizations (customizations, callouts, workflow, data...) of a CRM to another one. Is there a way to automatically (from a program, not manually) import/export workflow rules ? I know there exist web services for callouts import/export, is there the same for workflow rules. Regards, I don't think so. Workflow import/export is handled by a separate application and cannot be accessed through any of the CRM web services -- David Jennaway - Microsoft Dynamics CRM MVP Web: http://...

Historical Stock Status As of Date
This is a multi-part message in MIME format. ------=_NextPart_000_00A5_01C8845C.ADFC9B50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I'd like to know whether anyone has encountered an issue wherein the As = of Date that is printed in the Historical Stock Status Detailed by Item = does not follow the date as indicated in the report options screen. = Currently we are trying to print the said report but no matter what date = we put in, the As of Date that prints on the report is set to 30 Jan = 2008. Is there anything that we...

Find the number of years between two dates
I have aroster of players with thier date of births. I would like to automatically add their ages in another column Try this Formula, assuming that the dob is in cell A1 =DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days" regards Mukesh "duke" wrote: > I have aroster of players with thier date of births. I would like to > automatically add their ages in another column On Fri, 9 Sep 2005 19:47:02 -0700, "duke" <duke@disc...

How can i use a command button to validate date and time
I have two command buttons, each on a different sheet. i need both of them to put the current date in one cell on its sheet and current time in another on its sheet. i also need these cells to be locked so the user can only edit these cells by clicking the command button. Any answers? ...

Todays Date that does not update
I created a macro and a button that when clicked it entered todays date in a cell, which is what I wanted. I used "Today( )". Problem is the date keeps updating to todays date and I want it to stay the date I entered it in. Is there some other value or formula to do this so it does not update everyday? Thanks!! You need to enter the date itself. Any function will always update to the current date. Ctrl+; will enter the current date in a cell. In VBA, use Range("A1").Value = Date -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC...

DATE 01-04-08
Hello again! I am using this code =DateSerial(Year([Opened Date]),Month([Opened Date]),Day([Opened Date])+10) on my form....is there a way for the date to get recorded in the main table as well. because on the form and the report it shows up, but not in my main table...do I need to run an update querie or something??? Any suggestions?? Thanks Ransom Ransom, It would be simpler like this: =[Opened Date]+10 Is Opened Date a field in the same record as where you want to record this calculated date value in the table. So this date, whatever it is, will always be 10 days after the Ope...

Can't get automatic updates to work
I get this message: [Error number: 0x8DDD0018] The site cannot continue because one or more of these Windows services is not running: Automatic Updates (allows the site to find, download and install high-priority updates for your computer) Background Intelligent Transfer Service (BITS) (helps updates download more quickly and without problems if the download process is interrupted) Event Log (keeps a record of updating activities to help with troubleshooting, if needed) To make sure these services are running: 1. Click Start, and then click Run. 2. Type servic...

date confusion
hi im new to excel 2007 i want to ask that when i type 7/4 in a cell excel thinks that the slash is division operator so it divides it ?? but in different cell it interpret it as date ok another problem is that when I enter 7/4 in the different cell excel interpret it as 4-Jul only but How do I display the year too ? even if i type 7/4/2008 or 7/4/08 it still shows 4-JUL ? Help please thank you very much Format the cell as m/d/yyyy, you created the d-mmm format by just entering 7/4 so you need to reformat the cell to the date format you want. Always use the full date when entering dat...

Money using wrong date to calculate ROI YTD
I have opened a new file in Money to track investments for a stock club. I entered all transactions, which go back to Jan. 2002. When I look at performance for the account, the ROI YTD is not accurate, as Money is using values for the stocks going back only 6 months form the date I enterd the transactions rather than the values as of 1/1/03. What to do? In microsoft.public.money, Brooks wrote: >I have opened a new file in Money to track investments for >a stock club. I entered all transactions, which go back >to Jan. 2002. When I look at performance for the account, &g...

date Format #28
-- Regards, ------------------------------------------------- Mahmoud Metwally Ali Jaicorp IT Manager Office Tel. : (202) 3471495/361 Mob. : (2010) 5195169 ...

how to automatically delete non-contiguous rows
Is it possible to define a large data field then delete non-contiguous rows, like every fifth row, without having to delete each row one at a time? Hi One way to insert a column with a formula and use SpecialCells(xlCellTypeBlanks) to delete the rows Test it on a copy of your workbook Sub test1() Application.ScreenUpdating = False Dim myRows As Long Range("A1").EntireColumn.Insert myRows = ActiveSheet.UsedRange.Rows.Count With Range(Cells(1, 1), Cells(myRows, 1)) .FormulaR1C1 = "=IF(MOD(ROW(),5)=1,""Keep"","""&...

Automatically adjust table row height in Publisher
Is it possible to have Publisher automatically adjust row height when working in a table? No... -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "cdavetype" <cdavetype@discussions.microsoft.com> wrote in message news:AAADE565-0540-4135-B7EF-D6DB4AD01B91@microsoft.com... > Is it possible to have Publisher automatically adjust row height when working > in a table? ...

Date Header and Layout Questions
I have 1 table with headings of: TaskType SiteName StartDate EndDate On a report, I want the header to show every Monday's date going horizontally displaying every Monday from now until 2 years from now. Then I want the Vertical column to be the TaskType. Within the report I want the SiteName to be identified in both the Monday's Date Column and the TaskType Column. For example, 30-Nov-09 (Monday) TaskType-DSR SiteName - DC. The date being on the header, the TaskType on each row and the SiteName cross referenced between them. Does this make any sense? ...

Automatic Sharing 09-04-06
I want to set up records so they can be automatically shared with a particular team if a flag is set. Is this possible? I need to set it up to be shared with a team as opposed to a business unit as there will be people from different levels and business units involved. Basically, if the user clicks on the "Yes" radio button to set a particular bit, I want to share the record with a team. Am not really sure how lookup's work in terms of just being able to set them, so I guess that's my problem. Also, the team lookup isn't an attribute of the record (for example, Accoun...

Important dates Gone
Hi, Went from 2003 to 2004. In 2003 I had money express and my home page show important dates. Via the options the dates are still there. But don't show up any more? Anyone knows how I can fix this? Thanks Jeff ...

How do I get non-sequential dates on X-axis
I am trying to make a chart that tracks progress each week from Monday to Friday. i.e. June 5 to June 9, then June 12 - June 16. This goes on the X-axis. Each time I try and chart the series without the dates it works OK. As soon as I add the date, Excel automatically fills in the weekend days. I have looked at every option that I can think of and prefs but can't get it to just show the dates that I actually want to chart. Can someone tell me how I can force Excel not to show dates for which there is no data and there is no labels etc? Thanks in advance Using Excel 2004 for Mac...