473,320 Members | 2,048 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 for DataEntryDate and DataUpdateDate

With Access 2003 SP2, no problem having a field with date type of
Date/Time and default to today's date (with default to date()), and
let's call it DataEntryDate, however, when adding another field, call
it DataUpdateDate (of date/time data type and default to date()), this
field won't be populated when update occurs, what I intend to do is
doable, right? how?

TIA.

Mar 15 '06 #1
5 1055
GH
TIA,

Can you clarify what you mean by the new field won't be upated when
update occurs? Do you mean an update via a form or directly in the
table? Do you mean will the date value update after the field is
already populated to the current date when any change in the record
occurs? Do you mean will the new field value be auto-populated for all
of the pre-existing records? Do you mean something else entirely?

- GH

Mar 15 '06 #2
GH
As a follow up to my previous post, maybe the MSDN explanation answers
your specific question:
http://msdn.microsoft.com/library/de...HV05187161.asp

- GH

Mar 15 '06 #3
I meant direct in the table. For instance,
data in row 1 looks like this
1 John Doe Jo******@xyz.com Working on abc project 03/14/2006

Now, I edited it. It would be desirable to read like this (with editing
date)
1 John Doe Jo******@xyz.com Working on def project 03/14/2006
03/15/2006 {today's date -- update date}

However it currently it reads like this
1 John Doe Jo******@xyz.com Working on def project 03/14/2006

Are you with me?

Thanks.

Mar 15 '06 #4
GH
I think I understand. The answer to your question is two parts.
First, the default value only works on the initial insert of a new
record, so it would not update any existing records or on any changes
to existing records regardless of whether you are in the table or on a
form.

Unfortunately, I have not figured out a method to emulate a true
trigger on an Access table other than using the default, input mask,
and validate items, which have very specific usage, so maybe someone
else can jump in here with some thoughts.

On a form, however, you can add a small bit of VBA code to update the
date field's value to the current date on the before update event of
the record, like:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.DataUpdateDate.Value = Date
End Sub

Presumably, since you would not want a user making changes to the
value, you would have the textbox bound to the column hidden.

I hope this helps, although I, sadly, cannot directly address forcing
the update date when doing direct table entry.

- GH

Mar 15 '06 #5
Thanks anyway, it would work with SQL Server (at least 7 and 2000).

Mar 16 '06 #6

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

Similar topics

2
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much...
4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
2
by: Tjerk | last post by:
Hello all, I have the script below to change an image depending on the date upto january it worked fine but then it just stopped working does anybody have an idea how I can make it work again or...
7
by: Mick White | last post by:
According to the Safari browser the world began on "Fri Dec 13 1901 15:45:52 GMT-0500", but I need to be able to get around this limitation. I am interested in dates from 1500 to 1901, as far as...
9
by: Thomas R. Hummel | last post by:
Hello, I am importing data that lists rates for particular coverages for a particular period of time. Unfortunately, the data source isn't very clean. I've come up with some rules that I think...
30
by: Dr John Stockton | last post by:
It has appeared that ancient sources give a method for Numeric Date Validation that involves numerous tests to determine month length; versions are often posted by incomers here. That sort of code...
4
by: peashoe | last post by:
I have an asp page that uses a calendar.js (pop-up) file to add an exact date format in the text field (txtDDate). My problem is I need some javascript that sets an alert that does not allow them...
3
by: captain | last post by:
Below is the sql for data with same date need to extract + or - 5 days data of same date also. How to also get data of + and - days related to same date. SELECT IM.Area, IM.Location,...
12
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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...
0
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

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.