Making comments field mandatory on changing status
I wants the user to put the comments mandatory when user is marking the bug status as 'Pending'. I wrote the following script but it is still allow the user to go without putting any comments
If Bug_Fields("BG_STATUS").IsModified and Bug_Fields("BG_STATUS").Value = "Pending" and not Bug_Fields("BG_DEV_COMMENTS").IsModified then
Bug_CanPost = False
msgbox "You must enter a comment when marking a defect as Pending.,QC Admin"
Bug_CanPost = True
Anyone please comment on the above mention issue & on code.