Quantcast
Viewing all articles
Browse latest Browse all 14708

Re: Mandatory Closing Date for multiple statuses

According to this reference

http://msdn.microsoft.com/en-us/library/5h27x7e9

it appears to me that your syntax is incorrect. But I could be wrong.

 

Try this

 

Sub Bug_FieldChange(FieldName)
   On Error Resume Next
   If FieldName="BG_STATUS" then
     If Bug_Fields("BG_STATUS").value="Closed" then
         Bug_Fields("BG_CLOSING_DATE").IsRequired=True
         Bug_Fields("BG_CLOSING_DATE").Value= date
     Elseif Bug_Fields("BG_STATUS").value="Deferred" then
         Bug_Fields("BG_CLOSING_DATE").IsRequired=True
         Bug_Fields("BG_CLOSING_DATE").Value= date
     Elseif Bug_Fields("BG_STATUS").value="Rejected" then
         Bug_Fields("BG_CLOSING_DATE").IsRequired=True
         Bug_Fields("BG_CLOSING_DATE").Value= date
     else
	' do nothing
     End If
   Else
       Bug_Fields("BG_USER_02").IsRequired=False
   End If
   PrintError "Bug_FieldChange"
   On Error GoTo 0
End Sub

 


Viewing all articles
Browse latest Browse all 14708

Trending Articles



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