Function ON_Create(inBLOB)
' Dim count
' Dim c
' Dim i
' Dim s
' s=""
' count = self.COUNT
' i=0
' while i<count
'  set c=self.CONTROLS(i)
'  if (c.HasProperty("Font")=True) then
'   c.Font.Charset = 204
'  end if
'  i=i+1
' wend 

ON_Create = "1"
end function


Function ON_Save(inBLOB)
Dim c
Dim RetVal

dim NAMETO
dim NAMEFROM
dim SUBJECT
dim BODY

Dim i

RetVal="1"
set c=self.controls("qMessage")


'
'self.Controls("DATVAL").SetFocus
NAMETO=self.Controls("NAMETO").Text
if(NAMETO="") then
  MsgBox "  ",0," BARS"
  ON_Save = "0"
  self.Controls("NAMETO").SetFocus
  Exit function
 end if
 ON_Save = RetVal

NAMEFROM=self.Controls("NAMEFROM").Text
if(NAMEFROM="") then
  MsgBox "  ",0," BARS"
  ON_Save = "0"
  self.Controls("NAMEFROM").SetFocus
  Exit function
 end if
 ON_Save = RetVal

SUBJECT=self.Controls("SUBJECT").Text
if(SUBJECT="") then
  MsgBox "  ",0," BARS"
  ON_Save = "0"
  self.Controls("SUBJECT").SetFocus
  Exit function
 end if
 ON_Save = RetVal

self.Controls("SUBJECT").SetFocus
'BODY=c.FieldByNameString("BODY")
'BODY=self.Controls("BODY").Lines.Text
'if(BODY="") then
'  MsgBox "   ",0," BARS"
'  ON_Save = "0"
'  self.Controls("BODY").SetFocus
'  Exit function
' end if
 ON_Save = RetVal

end function

Function ON_SignDoc(inBLOB)
Dim RetVal

'RetVal="1"
' MsgBox "..."
' RetVal = ON_Save(inBLOB)
' if RetVal = "0" then
'   ON_SignDoc = "0"
'   Exit Function
' end if
' ON_SignDoc = "1"

ON_SignDoc = ON_Save(inBLOB)
end function

Function ON_Delete(inBLOB)
' MsgBox "..."
 ON_Delete = "1"
end function

