Today's date on a textbox based on combo box

west

Registered User.
Local time
Yesterday, 16:01
Joined
Feb 11, 2010
Messages
25
Hello everyone,

I have a "Status" combobox, I'd like the "Date Case Closed" field to auto fill today's date when "Status" combobox = Closed. The way I know how to do this is by using an IIf with Date() function, but, if I do that, the date is gonna keep changing everyday.

Do I have options to do this?

-JC
 
Perhaps some code in the After Update event of the combo box, along the lines of:
Code:
If Me.ActiveControl = "Closed" Then
  Me.[TextBoxNeme] = Date()
Enf If
 
Thank you Bob it worked exactly the way you suggested here, only thing now is a little awareness for the users no to change the [Status] unless it is really necessary, because, if they change it by mistake there is no turning back or undo.

Thanks again :)

-JC
 
Thank you Bob it worked exactly the way you suggested here, only thing now is a little awareness for the users no to change the [Status] unless it is really necessary, because, if they change it by mistake there is no turning back or undo.

Thanks again :)

-JC
Not sure I understand your concerns but perhaps something like:
Code:
If Me.ActiveControl = "Closed" AND Not IsNull(Me.[TextBoxNeme]) Then
  Me.[TextBoxNeme] = Date()
Enf If
 

Users who are viewing this thread

Back
Top Bottom