Create an Event Handler
Event: StdFormPredisplay
Type: SetValues
Parms: SETVARVALUES(UserName=USERNAME())
Public Sub CheckVoid()
Dim isVoided As Boolean = CBool(ThisForm.Components("ILC_VoidCheckbox").Value)
If isVoided Then
ThisForm.Components("ILC_VoidedByEdit").SetValue(ThisForm.Variables("UserName").Value)
ThisForm.Components("ILC_VoidedDateEdit").SetValue(Date.Now)
Else
ThisForm.Components("ILC_VoidedByEdit").SetValue(Nothing)
ThisForm.Components("ILC_VoidedDateEdit").SetValue(Nothing)
End If
End Sub
Comments