code for enabling disabling defect fields cont…

Posted: November 16, 2018 in Uncategorized

Sub Bug_MoveTo
On Error Resume Next

WizardFieldCust_Details ' Added by wizard

if Bug_Fields("BG_STATUS").Value = "Open" then
Bug_Fields("BG_USER_02").IsRequired = True
else
Bug_Fields("BG_USER_02").IsRequired = False
end if

On Error GoTo 0
End Sub

Sub Bug_FieldChange(FieldName)
On Error Resume Next

if FieldName = "BG_STATUS" and Bug_Fields("BG_STATUS").Value = "Open" then
Bug_Fields("BG_USER_02").IsRequired = True
if Bug_Fields("BG_USER_01").Value "" then
Bug_Fields("BG_USER_01").IsVisible = True
Bug_Fields("BG_USER_01").IsReadOnly = True
end if
else
Bug_Fields("BG_USER_02").IsRequired = False
end if

if FieldName = "BG_USER_02" and Bug_Fields("BG_STATUS").Value = "Open" then
Bug_Fields("BG_USER_02").IsReadOnly = True
Bug_Fields("BG_USER_02").IsRequired = True
Bug_Fields("BG_USER_01").IsVisible = True
end if

if FieldName = "BG_USER_01" and Bug_Fields("BG_USER_01").Value "" then
Bug_Fields("BG_USER_01").IsReadOnly= True
Bug_Fields("BG_USER_02").IsReadOnly = True
Bug_Fields("BG_USER_02").IsRequired = True
Bug_Fields("BG_USER_01").IsVisible = True
end if

On Error GoTo 0
End Sub

Leave a comment