?
Solved

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

Posted on 2011-03-14
4
Medium Priority
?
435 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
  • 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

807 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