Trying to change a field based on Assigned to user group

Hi, 

I have couple of customized fields in defects section.

Based on "Assign To" user, i am trying to find the group of the user (Developer, Functional, QA).

Next, select the team (DEV or Test) the defect is currently in based on the group found from above.

Using below code but it's not working. Any help here pls..

Sub Bug_FieldChange(FieldName)
On Error Resume Next
if FieldName="BG_Responsible" then
Select case Bug_Fields("BG_Responsible").Value
case (Bug_Fields("BG_Responsible").Value).IsInGroup("Developer")
Bug_Fields("BG_USER_05").Value = "DEV Team"
case (Bug_Fields("BG_Responsible").Value).IsInGroup("Functional_Testing")
Bug_Fields("BG_USER_05").Value = "Testing Team"
Case Else
Bug_Fields("BG_USER_05").Value = ""
End Select
End if
PrintError "Bug_FieldChange"
On Error GoTo 0
End Sub

Thanks