Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Date Time shown at the sametime
Mubeezi Micah 

15 years ago
Dear Richard,

It is very strange. Although it looks obvious, I tried either options and surprisingly, it does not give the desired result in an Access 2007 database. Give it a try and you will be shocked. Illustration: When i used General Date as a the table format, i got 01/20/2011. When i changed to a custom format like mm/dd/yyyy hh:nn i got 01/20/2011 00:00. When i added quotes to the custom format "mm/dd/yyyy hh:nn", the field contents became mm/dd/yyyy hh:nn. If you use Now() as the default value, you get say 01/20/2011 01:40. This is better but i think it can create a possible problem. The Now() value is saved in the table before you insert the next record. This means, if you are tracking exact time when say an employee arrives, you might miss those who may come late because the Now() that will have been saved will be the time when you were entering data of  the last record i.e., the last employee who arrived.

This probably shows the limitations of using table level rules. Probably using the Form's BeforeInsert event would be better. We would write something like
Either
MyFieldName = Now()

Or using a recordset (summarised)
rs.AddNew
rs!MyFieldName = Now()

Has any of my fellow students encountered something like this before? Can someone try out in a Access 2010 or 2003 and share their experience?

Best regards,

MICAH


Reply from Richard Rost:

I agree. Using Now() as the default time at the TABLE level is only good if you really don't need to be exact. For example, I'll use it for the DateAdded field for a Customer or even an Order because it's usually "close enough." But if you need an EXACT time, use a form-level VBA event like Micah suggested.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 8/17/2026 6:07:13 PM. PLT: 1s