Mar 10 2005, 10:50 AM
Strange problem and hopefully someone can help.
All i want to do is have a form display and save to a table the actual time and date when a button is clicked. although this sounds simple im getting very strange results. ive tried...
Me!.[creation] = Date()
also tried using the Now() command
and for some reason access is just making dates up in random order on my records ie 02:30am 10/12/2076 ect.
My system time and date are correct.
Can anyone please shed some light on why this is happening its driving me mad :(.
Mar 10 2005, 10:56 AM
I'd start by looking at the data type of the field in the table and the control on the form. Make sure they are both date/time format.
Mar 10 2005, 10:59 AM
Me![creation] = Now()
Why is there a . after the ! in your code?
Is there a format applied to the field in the table or form? Is it set to a date/time data type?
What are your regional settings in the control panel? Is the correct time zone selected?
What is displayed if you type debug.Print now() in the Immediate Window
Mar 10 2005, 11:02 AM
yes they are both set correctly, and there is also no other code on this page that would conflict, i have also just created a new form with 1 unbound field and one button and on click just sets field1 to now() and it still keeps giving me totally random dates and times.
Mar 10 2005, 11:25 AM
Does your code compile?
- Close an open instances of Access.
- From the command line, type msaccess.exe /decompile.
- Access opens up. Open the database you want to decompile. Depending on the version of Access you are using, you may or may not see a message about VBA code. If you do see the message, just ignore it.
- Open up any module. Select the Compile All Modules and Save All Modules menu items.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here