By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

Update old record date when user click on D_Status

P: n/a
I create two fields in my old table. One is D_Status of type Yes/No
Checkbox and the other is DDate of type Date. In my table there is
already records in it. I set the default value of DDate as Date() (as I
need the current date). My problem is when user open the form and click
on D_Status in any old record, The record is not updated with the
current date. But when user enter the new record its save with the
current Date. My question is how to i update the old records on the
basis of D_Status if user click (Dstatus) on old record it must be
update field DDate with the current date needs help.

Thank You.

Aug 27 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 27 Aug 2006 16:40:04 -0700, co*********@gmail.com wrote:
I create two fields in my old table. One is D_Status of type Yes/No
Checkbox and the other is DDate of type Date. In my table there is
already records in it. I set the default value of DDate as Date() (as I
need the current date). My problem is when user open the form and click
on D_Status in any old record, The record is not updated with the
current date. But when user enter the new record its save with the
current Date. My question is how to i update the old records on the
basis of D_Status if user click (Dstatus) on old record it must be
update field DDate with the current date needs help.

Thank You.
I'm not clear on what you want.

A field's Default Value is ONLY saved when a new record is created,
not when an existing record is changed.

If you wish to change the [DDate] value to the current date whenever
the [D_Status] is CHANGED to either Checked or Unchecked, then code
the [D_Status] AfterUpdate event:

Me![DDate] = Date

If you wish to change the [DDate] value only if the check box is
changed from Unchecked to Checked, then code the [D_Status]
AfterUpdate event:

If Me![D_Status] = -1 Then
Me![DDate] = Date
End If

In this case, if you change the check mark from Checked to Unchecked
the date will not be changed.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Aug 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.