Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Insert Today's date in one field based on the value of another

Posted on 2011-03-14
4
Medium Priority
?
432 Views
Last Modified: 2013-11-28
I have a tracking database and I want to make it so that when the person marks the "status" field "completed" it inputs today's date in the "datecompleted" field.  How do I do this in my form?
0
Comment
Question by:dcmennealy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
ErezMor earned 500 total points
ID: 35133704
you use the "AfterUpdate" event of the status field to :

if status="completed" then datecompleted=Date()

(the above is as plain as you described the scenario, meaning the status field is string that may receive the sting "completed")
0
 

Author Comment

by:dcmennealy
ID: 35133960
Thanks, it worked!
0
 

Author Closing Comment

by:dcmennealy
ID: 35134061
I am new to VBA and this was very simple and useful
0
 
LVL 12

Expert Comment

by:ErezMor
ID: 35140731
you are most welcome to ask further
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question