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 
Form fields with autofill but editable
Reno 

16 years ago
Dear Richard
My problem; When I recieve a letter, its date will be data in column "first date". "Second date" will then be "first date + 10 days .. "third date" will be second date + 10 days ..and so on for the next 4 columns - So far so good -:-)

If I answer a letter before 10 days, I would like to enter that date in "Second date" and "third date" .. "Fourth date" etc should aoutoupdate related to the newly entered value.
It can do the first autofill, but then.. I am not able to enter a new value ... ? Do you have an idea.

I am a newby .. but have copied small lines of code into the VB editor to make my database open/close and search data out in tables

best wishes


Answer from Richard Rost:

Reno, I assume that you're using a query with a calculated field to automatically fill in the SecondDate field so that it's:

SecondDate:FirstDate+10

What you need to do instead is to make a FORM where you have an AfterUpdate event for the FirstDate field that sets the value of SecondDate in VBA code. This way you can CHANGE it later if you want to, instead of relying on a calculation to do it for you on the fly.

This tutorial will explain how to do that:

You can use an AfterUpdate or BeforeUpdate event to set values, change properties, run macros, and do lots of other cool things.

The major difference between the two is that BeforeUpdate runs BEFORE the data is saved to the table, which allows you to CANCEL the update if the data is not valid. AfterUpdate runs after the data is saved to the table.

Please see the following FREE video tutorial on my web site for step-by-step instructions on how to create an AfterUpdate event:

http://599cd.com/tips/access/afterupdate-event-vba?key=BlFAlEx

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: 6/9/2026 8:18:49 AM. PLT: 1s