Date and time onto a form

Hi, I am designing a form that my client would like the date and time 
automatically recorded in a field and stored so that when they refer back it 
shows when the record was done. The 'NOW' function only shows the current 
date & time and keeps updating. Is there a way of putting the 'NOW' value 
into a field, then locking it so it doesn't change when the record is 
reopened.
Hope that makes sense! 
Kazlou
0
Utf
11/18/2007 2:47:01 AM
access.forms 6864 articles. 2 followers. Follow

1 Replies
938 Views

Similar Articles

[PageSpeed] 51

The form stores data in a table. You need to add a date/time field to your 
table to record the date and time a record was last updated.

1. Open the table in design view.

2. Add a new field named (say) LastUpdate, type Date/Time.

3. Save and close the table.

4. Open your form in design view.

5. In the Properties sheet, set the Before Update property of the form to:
        [Event Procedure]
Note: Make sure the title bar of the Properties sheet says "Form."
It won't work if you set the property of a text box.

6. Click the Build button (...) beside the property.
Acess opens the code window.
Set up the code like this:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
        Me.[LastUpdate] = Now()
    End Sub

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Kazlou" <Kazlou@discussions.microsoft.com> wrote in message
news:09A5101A-E03B-4CEB-B149-012606FA0950@microsoft.com...
> Hi, I am designing a form that my client would like the date and time
> automatically recorded in a field and stored so that when they refer back 
> it
> shows when the record was done. The 'NOW' function only shows the current
> date & time and keeps updating. Is there a way of putting the 'NOW' value
> into a field, then locking it so it doesn't change when the record is
> reopened.
> Hope that makes sense!
> Kazlou 

0
Allen
11/18/2007 6:01:34 AM
Reply:

Similar Artilces:

Excel Re-Calc causes network traffic and very slow response times.
Platform: Excel Ver 2003 SP2 Windows XP SP2 Microsoft SBS Server 2003 Workstations: P4 2Ghz, 512 Mb Ram Problem: I have an excel file with hundreds of vlookup and indirect formulas. It has no links to any other spreadsheets. The file resides on a shared network drive on our server. When users do a recalc or change a number in the file causing a recalc it takes about 7 seconds... however after a bit of experimentation I find that if we open the file and then disconnect the workstations network cable the recalc takes less than one second ! Tried saving the file to the local drive of a workstati...

Can I tack a note onto a to do list item or an email?
Can I tack a note onto a to do list item or an email? See http://www.msoutlook.info/question/359 -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more http://www.msoutlook.info/ Real World Questions, Real World Answers ----- "guitar man" <guitar man@discussions.microsoft.com> wrote in message news:92D62DC7-C620-4AD1-BD0A-9233118535EA@microsoft.com... > Can I tack a note onto a to do list item or an email? ...

Automating Time Scale X-axis
I would appreciate some suggestions on how to automate a chart's x-axis values. For instance, I would like to be able to have my chart update to the last 30 days of data so that each time the file is opened, the data is updated in the chart to show the last 30 days from the current date. Can this be done? Tushar Mehta has a tutorial for dynamic charts: http://www.tushar-mehta.com/ David Lawrence wrote: > I would appreciate some suggestions on how to automate a > chart's x-axis values. For instance, I would like to be > able to have my chart update to the last 30 d...

Keeping Form values after PreCalloutReturnValue.Stop/Abort ?
The system in question has a precallout on the create event, where some data has to be validatet to suceccesfully store them in crm. This is not a problem, but the problem (more an annoyance then a problem) is that if the data was not validated the precallout return abort and the form the user was working with is completely blank. Is there anyway to keep the values the user entered after an abort/stop, so that they didn't have to enter all the values over again, rather then just editing the "wrong values". Cheers... Gaute If you search the Microsoft Dynamics CRM Develop...

Sorting dates #2
I have date column set as: d/m/yyyy when I do a sort its sorting by day, I want it sorted chronologically, how can this be done? eg heres what my sort ended up as: 12/8/1819, 13/2/1835,17/12/1813,19/5/1833 Thanks Althea --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.593 / Virus Database: 376 - Release Date: 20/02/2004 Hi Althea if you have only dates in this column just sort them. This sort meachanism is Excel's default. -- Regards Frank Kabel Frankfurt, Germany AB wrote: > I have date column set as: d/m/yyyy &...

Help required on working with date
Hi I have dates in a column in dd-mmm-yy format, like 29-Mar-04 15-Apr-04 13-May-04 I want to put in the column adjecent to this date column the date starting with 1st day of each month like - 01-Mar-04 01-Apr-04 01-May-04 How can this be done by use of formula? I tried but do not get any clue to go futher. -Shanks Hi try =DATE(YEAR(A1),MONTH(A1),1) -- Regards Frank Kabel Frankfurt, Germany Shanks wrote: > Hi > > I have dates in a column in dd-mmm-yy format, like > > 29-Mar-04 > 15-Apr-04 > 13-May-04 > > I want to put in the column adjecent to this da...

USING DATES IN FORMULAS #2
I foubd a problem with excel 2003 If you introduce a formula using dates (in spanish version) (dd/mm/yy), excel doesnt makes the calculation........... ???? Can somebody hep me In the USA version (English), I could use: =if(a1=date(2005,10,27),"It's Oct 27, 2005","it's not") to refer to a date. I don't know what the Spanish function is for =date(), though. Carlos Benavides wrote: > > I foubd a problem with excel 2003 > If you introduce a formula using dates (in spanish version) (dd/mm/yy), > excel doesnt makes the calculation........... ????...

Exchange 2003 System Manager Server Modified Date Meaning
Hi, I am looking for some info on the Exchange 2003 system manager server property page. It shows in the right hand colum all the servers and service packs and the furthest right says "modified date" Could some one please eleborate on what this actually means? Thanks On Tue, 31 Jan 2006 06:20:28 -0800, Darrel <Darrel@discussions.microsoft.com> wrote: >Hi, > >I am looking for some info on the Exchange 2003 system manager server >property page. It shows in the right hand colum all the servers and service >packs and the furthest right says "modified d...

Continuous Form & 2 queries
User would like a spread sheet type look (former excel junkie)…but for a good reason. Will describe in nontechnical terms: The data on left half is related to data on right half by a unique common field. But a query that would bring them into a single record source results in the query not being update-able. (The left half data is from a query that has a sum subquery….so I understand why the query is not updateable) So while the left half data is static – the right half data is update-able. Going with a subForm loses the continuous form look they want to scroll thru lots of lines of ...

Date Expiration and highlight
Here is the problem folks If Today's date (in cell o2 or Today()) is older than the value date (10/31/07) in L4 cell P4 shlould display "Still valid" and cells between A4 thru P4 should display green If Today's date (in cell o2 or Today()) is newer than the value date (10/31/07) in L4 cell P4 shlould display "Quote Expired" and cells between A4 thru P4 should display red. I will donate 20$ to children with leukemia non profit organization. Regards On Oct 31, 6:50 pm, turkyildiz <turkyil...@gmail.com> wrote: > Here is the problem folks > > If...

Automatic resize of controls on form
I'm about to do a new application and so far i have only made none-resizable forms.. I want to try to do an app, that can be resized by the user. I was thinking along the lines of doing a initial size config, based on the screen resolution and then letting the user drag the screen og via the menu select preset resolutions of the app (limited by the gfx capablillities of the system running the app). I'm not familiar with Anchor/Dock as such. I've been playing a little with them, but it seems to me, that they only stretch/schrink the controls in width. I can't s...

count between dates help (NETWORKDAYS)
Hello big brains I am trying to find the days and hours between 2 dates 2 columns of dates formated in M/D/YYYY hh:mm 4/23/2004 15:53 and 4/27/2004 10:43 I don't want to count weekends so I used NETWORKDAYS which works to a degree.. giving me 3 (which is days) but it's ignoring the time. I need it to be specific and have it show days and hours difference. I am suprised that it is ignoring it. Unfortunately I am kind of stuck with the dat being in this format. Any help would be appreciated. thanks Maybe this can give you some ideas http://www.cpearson.com/excel/DateTimeWS.ht...

GETPIVOTDATA and Date-type field (Excel 2007)
Data Sample *************** Trip 0346210980 Statement Date 3/24/2010 Description STARBUCKS Date 03/08/2010 LocCurrAmt 3.47 Formula: =GETPIVOTDATA("LocCurrAmt",A6,"Statement Date",DATE(2010,3,24)) Problem: I keep getting a #REF error. When I evaluate the error it's always with the DATE function. Steps I've taken: 1. Confirmed that my date is a number and not text. 2. Tried using the date serial number (40261) instead of the DATE function. 3. Confirmed the GETPIVOTDATA works...

Converting Text Field to Time
Is this possible? Me Probably, but what does the text field look like. -- HTH RP (remove nothere from the email address if mailing direct) "A P" <ap@textguru.ph> wrote in message news:uRvCdTHKFHA.3916@TK2MSFTNGP14.phx.gbl... > Is this possible? > > Me > > you might like to check out the TIME function, if you'ld like more assistance please post back with a sample or two of your "text" typed into your reply. Cheers JulieD "A P" <ap@textguru.ph> wrote in message news:uRvCdTHKFHA.3916@TK2MSFTNGP14.phx.gbl... > Is thi...

Copying and pasting a range x times based on user-defined value of x
I posted this in the members section, but haven't received a solution to my problem yet. Essentially I have a problem where I have a row with some user inputs and formulas that calculate based on those user inputs. There is another user input field (on another sheet) where they enter in a number ("x"). I'm trying to create a macro that will paste that row with formulas "x" times based on the user-defined value of the "x" field. In other words, if the user types in 40 in the user field, the macro pastes the row with formulas 39 times (sinc...

Form Size and Scroll Bars
Hello All, We have added a number of fields to the opportunity form. For some reason when the form loads the scroll bar goes all the way to the bottom of the form and the user has to scroll back up to the top of it. Any ideas why this might be happening? Thanks! Hi, Check out JScript in your onload event of opportunity. Is there any code which is moving the focuss to some field at bottom of form? -- PLEASE do click on Yes or No button if this post is helpful or not for our feedback. uMar Khan :: Freelance Consultant Email Contact :: imumar at gmail dot com "MDV1457" w...

Run-Time Check Failure #2
Hi I am getting this error Run-Time Check Failure #2 - Stack around the variable 'tokenPrev' was corrupted. I am also paste the my code can anyone tell me how can I fix this problem ? //--------------------------------------------------------------------------------------------- BOOL CnewAppDlg::OnInitDialog() { HANDLE hToken = NULL; DWORD hTokenLength = 0; TOKEN_PRIVILEGES tokenPrev = {0}; if(OpenProcessToken(GetCurrentProcess(),TOKEN_QUERY,&hToken)) { if(!GetTokenInformation(hToken,TokenPrivileges,NULL,0,&hTokenLength)) {...

time calculation 08-14-07
Any Help Please. . . I am new in access, and im doing some calculations from my query design. I need to calculate two fields in a query. It is like cascading calculation that the new field is the result and that result will be added to 2nd and to 3rd row and so on. The calculation is on hh:mm in 24 hr format. please see example: OnChk OffChk On/OffDifference Total Hour 8:59 13:45 4:46 1110:57 => This is carry over figure 8:50 12:57 4:07 1115:04 7:48 9:49 2:01 1117:05 1. I got the On/OffDifference by us...

Todays date in a cell
Hi I have a spreadsheet that I use to record data. I only fill it in about once or twice a week. What I want to do is when I open the spreadsheet I want to have todays date in the cell below the last one i.e dates in column A However I then want the dates to stay as those dates i.e if I open the spreadsheet on 07/07/03 with that date in cell A12 when I open the spreadsheet on 09/07/03 I still want 07/07/03 in cell A12 and 09/07/03 in A13 etc. What do I put in cell A2 and fill down the column? Thanks Sophie Try this but put the sheet you want and the cell you want. If Date does not work ...

Excel 2003- Charts- date and time format on x-axis of XY chart
Hello, I am trying to plot an XY graph with x-axis data in date and time format but Excel keeps counting the x-axis data as "data labels". It is in the format mm/dd/yy HH:mm ex) 10/28/06 17:00 Instead, Excel appears to be turning my XY plot into a line plot (for example, the first date is assigned an x-value of 1, the second value assigned an x-value of 2 and so on so that each date/time x-value is evenly spaced). I would like to find a way to plot this data so that it is spaced relative to date and time. Are your data values actually date and time, or are they text? Does ...

Calendar date function
I would like to insert a calendar icon into a cell so that when I click on it, it will bring up a calendar from which I can then select the date that I want to appear in the cell. Hi John See http://www.rondebruin.nl/calendar.htm -- Regards Ron de Bruin http://www.rondebruin.nl "John" <John@discussions.microsoft.com> wrote in message news:968D56F9-D1FA-4CB5-841E-94B51D717ED2@microsoft.com... >I would like to insert a calendar icon into a cell so that when I click on > it, it will bring up a calendar from which I can then select the date that > I > want to...

POP Blank PO Form
I am trying to get 4 decimal places to print on the above form for the Unit price, I can only get it to print 2, does anyone have any suggestions? The items are set for 4 decimal places. thanks -- Doug Doug, The field name for Unit Price is a calcaulted field based on conditions. One way to display four decimals points is to create a new calculated field of currency type and set the format to something like DLR1_4 which prints four decimal places. If you want to include a $ sign using this format then you need to check the box to display it. Check out some of the other formats avai...

Form fields vs. document properties
I'm creating common templates for multiple dealers of the same product. For example, one dealer may open my "Client Guide" document and all he needs to do is update approximately 20 fields and he is done. I'm using the standard document properties fields for my company information, but there are 10+ more unique fields I need to do this for. I've been trying all night to use quick parts, building blocks, etc. to accomplish this but I am really struggling. I can use a fill-in field, but it prompts for the field every place I use it. I've enabled th...

default appointment times problems
When i re-open outlook and go to the calender, all the appointments times have changed to 1am on the start day - 1am on the day after it waqs meant to finish. So a 12 day appointment is now shown as over 2 days. How do you change the default appointment time settings so an appointment which is just typed into the day is from 9am - 5pm for example and will stay as a 1 day event when opening and closing outlook? All day events are 12 -12, not 9-5. If you want it 9-5, you need to make it for 9-5. All day appointment change to 1 -1 if you change the time zone or DST settings aft...

Date format on checks
How do you change the date format on checks? Money 2005 is using a day/month/year format and several payees have complained that 1/5/05 means 1 May 2005 and their banks are objecting. Have you tried messing with Region Settings for the operating system? "ROBERT L GUTHRIE" <rlguthrie@mindspring.com> wrote in message news:tcXHd.2206$cZ1.904@newsread2.news.atl.earthlink.net... > How do you change the date format on checks? Money 2005 is using a > day/month/year format and several payees have complained that 1/5/05 means 1 > May 2005 and their banks are objecting....