PC Review


Reply
Thread Tools Rate Thread

How do I populate current date based on another fields output?

 
 
Selli
Guest
Posts: n/a
 
      22nd Jul 2008
I am trying to automatically populate a date field only when a specific
"status" is chosen. i.e. if Status = "Closed" then Resolved Date = Date()
(current date). If status <> closed then Resolved date is null. This would
be a form filed.
 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      22nd Jul 2008
On Mon, 21 Jul 2008 18:06:03 -0700, Selli
<(E-Mail Removed)> wrote:

In the Status field's AfterUpdate event write:
if Me.Status = "Closed" then
Me.[Resolved Date] = Date()
else
Me.[Resolved Date] = Null
end if
(of course you need to double-check the control names)

-Tom.
Microsoft Access MVP



>I am trying to automatically populate a date field only when a specific
>"status" is chosen. i.e. if Status = "Closed" then Resolved Date = Date()
>(current date). If status <> closed then Resolved date is null. This would
>be a form filed.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-populate date field based on two other fields. Dee Microsoft Access 7 17th Feb 2010 07:23 PM
Calculate based on two date fields, populate third which writed to AndyG Microsoft Access VBA Modules 2 29th Aug 2008 03:45 PM
Query/Report Output Based on Current Record in a Form silva Microsoft Access 3 21st May 2008 03:55 PM
How do I set a cell to auto populate the date to show the current week's Friday date? SaipanRick Microsoft Excel Discussion 4 10th Feb 2008 08:01 PM
Need pop-up form/report to populate based on current record =?Utf-8?B?UnVkb2xwaGlh?= Microsoft Access 4 19th May 2007 02:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:24 PM.