|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
automatically update date in access
hello from italy!
I have a form with a date field that I want to update automatically the date evrytime the record is modified. How I can do that in an easy way? I am a newbee so... If you can help me to solve this problem, I would be extremely thankful. Thanks |
|
#2
|
||||
|
||||
|
If your database supports triggers, you can put one to update that column. If not, route all your commands through a stored procedure and do it there (triggers are nothing more than stored procedures that the db will automagically execute for you).
__________________
Left DevShed May 28, 2005. Reason: Unresponsive administrators. Free code: http://sol-biotech.com/code/. Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html. Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html. It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it. --Me, I just made it up The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man. --George Bernard Shaw |
|
#3
|
|||
|
|||
|
Another way of doing it is to insert the following code in any of the fields After Update property. This way when you alter the data stored in a field it will update the date in the date field.
txtdate.value = format(Now(),"dd/mm/yy") (where txtdate is the name of text box that holds the date.) That should work. |
|
#4
|
|||
|
|||
|
I am trying to get a date-stamp to show up on a report. We originally designed the report in '97, and imported it into 2k, where it also functions properly. Now we've imported it into a 2k db using ODBC to link to Oracle and the function has stopped working. Any one know what is causing 2k to not recognize the "=now()" function?
|
|
#5
|
|||
|
|||
|
Try the =Date() function instead. If that doesnt work then I am unsure how to solve it.
Cheers |
|
#6
|
|||
|
|||
|
We stumbled across that one and tried it also, but it won't recognize either one. Does anyone know if now() and date() are VB functions or access functions? Could that be part of the problem?
|
|
#7
|
|||
|
|||
|
Quote:
Oracle uses a global reserved variable called SYSDATE. You can query with it, such as select * from myTable where reportDate < sysdate What reporting tool are you using? It may have a timestamp feature built-in if all you need to do is print the date on top of the report. If you're using Access reports, make a text box with the Control Source/value of =Now() Last edited by crimson117 : September 5th, 2003 at 02:39 PM. |
|
#8
|
|||
|
|||
|
Fixed it
The problem wasn't in Oracle at all- we had some corrupted VB code that was interfering with all the VB functions used by the report in question. We made a copy of the DB without the corrupted module and the report (which fortunately didn't need the code) began functioning properly.
Thanks for the help. |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > automatically update date in access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|