My Assistant
![]() ![]() |
|
|
Mar 10 2005, 10:50 AM
Post
#1
|
|
|
New Member Posts: 13 |
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
Post
#2
|
|
|
UA Admin Posts: 19,373 From: Newcastle, WA |
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.
HTH George |
|
|
|
Mar 10 2005, 10:59 AM
Post
#3
|
|
|
UtterAccess VIP Posts: 4,034 From: NY - USA |
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
Post
#4
|
|
|
New Member Posts: 13 |
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
Post
#5
|
|
|
UtterAccess VIP Posts: 4,034 From: NY - USA |
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. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th June 2013 - 07:41 AM |