Setting a field value from radio button/field
Posted on 2012-04-03
I have form for each associate. While they are employeed, they are Active. Once they terminate there is a radial button that the supervisor changes the status to Terminated and the Term_Date field is unhidden for them to put a term date in.
Some associates will term with the company and then come back. I am stuck how to do the following, When the supervisor changes the status back to Active I wanted it to set the value in the Term_Date field to NULL and also change the main_status field back to Achive from Archive.
I have tried the following on the On Exit Event, but it is not working.
Sub Exiting(Source As Field)
Set s = New NotesSession
Set db = s.CurrentDatabase
Set ws = New NotesUIWorkspace
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
Dim session As New NotesSession
If doc.Emp_Status(0) = "Term" Then
doc.main_Status = "Archive"
If doc.Emp_Status(0) = "Active" Then
doc.Term_Date = ""
doc.main_Status = "Active"