Date Stamp Problem

DanG

Registered User.
Local time
Today, 15:11
Joined
Nov 4, 2004
Messages
477
I have searched for the answer but just can't seem to find the answer...

I have a form with a combo box field called Transaction Status with two values to choose from.."Approved" and "Rejected". I also have an "Approved Date" field.

When a transaction goes into "Approved" status, I want the Approved Date field to be date stamped with that days date. Currently in my Approved Date fields Control Source I have the following formula "=IIf([Transaction Status]="approved",Date()).

The problem is when a transaction gets approved the Approved Date comes up with the correct date like it is supposed to but the date does not seem to be fixed, it changes as with every new day.

One thought I had is to put this formula into the "defauld value" property, could that work?

Thanks!!!
 
Approve

I think the control source of the Approved Date Field should be the field in the table or query you want the date to be stored in.

Then, in the After Update Event of the ComboBox put something like this:

If Transaction Status = "Approved" then
Me.Approved Date Field = Date()
Else
Me.Approved Date Field = ""
End If

Don't forget to rename the Combo Box and the Date Field with the appropriate names.

This way the date will be stored in the table, and you can also reset the date field in case of a mistake.
 
Works like a charm!

Thank you so much!
 

Users who are viewing this thread

Back
Top Bottom