JeffBarker
Registered User.
- Local time
- Today, 21:33
- Joined
- Dec 7, 2010
- Messages
- 130
Hi guys.
I'm having some problems with this - clearly a bit of a basic one so apologies in advance.
I'm currently in the process of creating a form to be used in an upcoming calling campaign, and I'm trying to get 1x combo box and 1x text box to update the Date/Time field that shows when the current record was changed.
What I need the controls to do is enter in the "Now" statement every time a new option is selected from the combo box, or some new text is entered in the text box - and likewise, if the field is cleared then the Date/Time field should also be updated.
I have the following code for both controls:
and
but I can only get the Date/Time field to update if using one of the above statments on a control - so either the *.value <> *.oldvalue, or Nz statements on the AfterUpdate event, but not together or as both statements entered into the AfterUpdate event.
Frustration!! Any suggestions on how to proceed with this would be excellent - thanks!
Jeff.
I'm having some problems with this - clearly a bit of a basic one so apologies in advance.
I'm currently in the process of creating a form to be used in an upcoming calling campaign, and I'm trying to get 1x combo box and 1x text box to update the Date/Time field that shows when the current record was changed.
What I need the controls to do is enter in the "Now" statement every time a new option is selected from the combo box, or some new text is entered in the text box - and likewise, if the field is cleared then the Date/Time field should also be updated.
I have the following code for both controls:
Code:
If Me.cboStatus.Value <> Me.cboStatus.OldValue Then
Me.LastCall = Now
ElseIf Nz(cboStatus, vbNullString) = vbNullString Then
Me.LastCall = Now
End If
and
Code:
If Me.txtOpNotes.Value <> Me.txtOpNotes.OldValue Then
Me.LastCall = Now
ElseIf Nz(txtOpNotes, vbNullString) = vbNullString Then
Me.LastCall = Now
End If
but I can only get the Date/Time field to update if using one of the above statments on a control - so either the *.value <> *.oldvalue, or Nz statements on the AfterUpdate event, but not together or as both statements entered into the AfterUpdate event.
Frustration!! Any suggestions on how to proceed with this would be excellent - thanks!
Jeff.