bluebunny72 icon

Auto-Populating edit boxes based on Checkbox value

bluebunny72 | PRO | 03/27/19 01:24:54 AM UTC | 0 ⭐ | 399 👁️ | Never ⏰ | []
VB.NET |

650 B

|

None

|

0 👍

/

0 👎

        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