viennese_finger
New member
- Local time
- Today, 13:17
- Joined
- Nov 21, 2016
- Messages
- 9
Hi - I have a form with a DateModified field/control. This field records the date an event occurs; this also causes a phase change in the main process.
The DateModified control is blank by default until this event occurs.
I am using a button ("Date modified"; on-click event; code builder; DateModified = Date) to enter today's date into the DateModified field - this works fine - the button is clicked and today's date is entered into the DateModified box.
However, I would also like a to register this change in the process or event in another field (combo box = cboPhase)
The code for this: If DateModified > 0 Then
cboPhase = 8
End If
So in design view for form, under 'property sheet' and 'event' on the DateModified field, and tried putting the above code into vairous events (afterUpdate, BeforeUpdate, On Dirty, On Change etc.) but none of them will change the value in the combo box field. Most of these options will record a 'manual' change in the DateModified field, e.g. if I change or update the date itself, the Phase value changes to 8, so I know that the code works; it's just getting it to update the cboPhase value once the date is changed by using the button.
Hope this makes sense, and that someone can understand what I'm trying to do!
Cheers,
Matt
The DateModified control is blank by default until this event occurs.
I am using a button ("Date modified"; on-click event; code builder; DateModified = Date) to enter today's date into the DateModified field - this works fine - the button is clicked and today's date is entered into the DateModified box.
However, I would also like a to register this change in the process or event in another field (combo box = cboPhase)
The code for this: If DateModified > 0 Then
cboPhase = 8
End If
So in design view for form, under 'property sheet' and 'event' on the DateModified field, and tried putting the above code into vairous events (afterUpdate, BeforeUpdate, On Dirty, On Change etc.) but none of them will change the value in the combo box field. Most of these options will record a 'manual' change in the DateModified field, e.g. if I change or update the date itself, the Phase value changes to 8, so I know that the code works; it's just getting it to update the cboPhase value once the date is changed by using the button.
Hope this makes sense, and that someone can understand what I'm trying to do!
Cheers,
Matt