The below code give me a compile Error : Arugement not optional on EMptyboth FrmPoliCreate. I know it is my coding problem how do i solve this?

I have another problem is I have to call EmptyWs in mskNCD textbox but would like to SetFocus on txtSumInsured textbox Until TxtSumInsured is True.

If i Include txtSumInsured.SetFocus The cursor will goes off to textbox1 where i click on the textbox1 even the condition iS TRUE.

VB Code:
  1. 'This is in the Module.
  2. Public Sub EMptyWS(FormName As Form, Cancel As Boolean)
  3. If Len(FormName.txtSumInsured.Text) = 0 Then
  4. MsgBox "Please enter a Sum Insured amount first", vbExclamation, "Wind Screen"
  5. Else
  6. FormName.txtWs.Text = CDbl(FormName.txtperWs.Text) * CDbl(FormName.txtSumInsured.Text) / 100
  7. KeepFocus = True
  8. End If
  9. End Sub
  10.  
  11. 'This is in the Form
  12. Private Sub mskNCD_Validate(Cancel As Boolean)
  13. EMptyWs FrmPoliCreate ' Arugement Not Optional ???
  14. End Sub


The reason that i implement in module and call in form because i have many forms which need this code.


thank you in at advance