bluebunny72

Auto-Populating edit boxes based on Checkbox value

Mar 26th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.65 KB | None | 0 0
  1.         Create an Event Handler
  2.         Event: StdFormPredisplay
  3.         Type: SetValues
  4.         Parms: SETVARVALUES(UserName=USERNAME())
  5.  
  6.         Public Sub CheckVoid()
  7.             Dim isVoided As Boolean = CBool(ThisForm.Components("ILC_VoidCheckbox").Value)
  8.  
  9.             If isVoided Then
  10.                 ThisForm.Components("ILC_VoidedByEdit").SetValue(ThisForm.Variables("UserName").Value)
  11.                 ThisForm.Components("ILC_VoidedDateEdit").SetValue(Date.Now)
  12.             Else
  13.                 ThisForm.Components("ILC_VoidedByEdit").SetValue(Nothing)
  14.                 ThisForm.Components("ILC_VoidedDateEdit").SetValue(Nothing)
  15.             End If
  16.         End Sub
Add Comment
Please, Sign In to add comment