Since my team is testing a UI intensive project, an attachment - in form of a file and/or snapshot is required for each defect. How can I make it a required field while posting a defect?

I have used the following 2 methods:

1. Include the following code in Bug_CanPost function. Here, the message keeps on displaying when clicking on submit even when there is an attachment.
<font class="small">Code:</font><hr /><pre>
Function Defects_Bug_CanPost
On Error Resume Next

If Bug_Fields("BG_BUG_ID").Value = "" and _
Bug_Fields.Field("BG_ATTACHMENT").IsNull then
Defects_Bug_CanPost = False
msgbox "You must include attachment to submit the defect"
Defects_Bug_CanPost = True
End If

PrintError "Defects_Bug_CanPost"
On Error GoTo 0
End Function
</pre><hr />

2. Added the following field inn Defects_Bug_New
<font class="small">Code:</font><hr /><pre>
Bug_Fields.Field("BG_ATTACHMENT").IsRequired = true </pre><hr />

Any help would be highly appreciated.