Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

Bug_FieldCanChange - Interrupted by ESC key

$
0
0

Hello All,

/t5/Quality-Center-ALM-Practitioners/Bug-FieldChange-FieldName-not-changing-the-field-properties/m-p/6899342

This post is in continuation with the previous post which is solved now. I'm trying to check few conditions before changing the status of the defect. 

Function Bug_FieldCanChange(FieldName, NewValue)
Bug_FieldCanChange = True
On Error Resume Next
If FieldName = "BG_STATUS" And NewValue = "Closed" Or NewValue = "Fixed" Then
    If Bug_Fields.Field("BG_USER_05").Value = "" Then
         Bug_FieldCanChange = False
         msgbox "You cannot change Status to Closed or Fixed if <Field Name> is blank."
    Else
        Bug_FieldCanChange = True
    End If
Else
    Bug_FieldCanChange = True
End If
On Error GoTo 0
End Function

When the fields in concern are not populated, it gives out a popup message and restricts the user from changing the field as long as the user presses 'OK' in the message box. 

But if the user presses ESC, it ignores the condition and changes the status.

Can you please advice how to prevent this? 

Thanks.


Viewing all articles
Browse latest Browse all 5491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>