Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
date time updates
Monty 

15 years ago
I have a form with DueDate, CurrentDate and DaysPastDue on it. What I need is a button on the form that when it's clicked on, all the CurrentDate fields in the record are updated to the current date/time. Currently I have this code below on the click event of a button I've labeled as Update Button:

Me.CurrentDate = Now()

Problem here is that it only updates one record (the first one in a column list of records)but does not update the rest. Putting =Now() as the default will only update new records. I've tried on the form open event to put =Now() but once again only one record gets updated. I need it so that all get updated. I have a calculation on the DaysPastDue field that will show me the days the bill is past due. I need to be able to click on this update button each week and get a new updated list of number day's past due. Hope I've given enough information.


Reply from Richard Rost:

If you want to change ALL of the values in EVERY record in your table, then you'll need to use an UPDATE QUERY. However, I'm curious as to WHY you need to keep a field for the current date when you can readily grab it on the fly with =NOW() to perform any calculations for days-past-due. You shouldn't need to store it in a field.

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: 5/17/2026 5:58:21 PM. PLT: 1s