home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 November / Pcwk1197.iso / LOTUS / Eng-ins / SMASTERS / APPROACH / CHECKBK.MPR / SCRIPT / ApproachDoc / Check2Window.s (.txt) < prev    next >
Null Bytes Alternating  |  1997-01-09  |  3KB  |  47 lines

  1. '++LotusScript Development Environment:2:5:(Options):0:66
  2.  
  3. '++LotusScript Development Environment:2:5:(Forward):0:1
  4. Declare Sub Recordchange(Source As Docwindow)
  5. Declare Sub Newrecord(Source As Docwindow)
  6.  
  7. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8.  
  9. '++LotusScript Development Environment:2:2:BindEvents:1:129
  10. Private Sub BindEvents(Byval Objectname_ As String)
  11.     Static Source As DOCWINDOW
  12.     Set Source = Bind(Objectname_)
  13.     On Event Recordchange From Source Call Recordchange
  14.     On Event Newrecord From Source Call Newrecord
  15. End Sub
  16.  
  17. '++LotusScript Development Environment:2:2:Recordchange:1:12
  18. Sub Recordchange(Source As Docwindow)
  19.     If currentview.name="Data Entry Screen" Then
  20.         If currentview.body.commitflag.text="1" Then
  21.             currentview.body.voidbutton.text="Remove this transaction from the balance"
  22.             If (currentview.body.transtype.text=("") Or (currentview.body.transtype.text="None")) Then
  23.                 Messagebox("You must specify a transaction type of Check, Deposit, or Misc Withdrawl.")
  24.                 currentview.body.checkradio.setfocus
  25.             End If
  26.         Else
  27.             currentview.body.voidbutton.text="Apply this transaction to the balance"
  28.         End If
  29.         If currentview.body.Transtype.text="Check" Then
  30.             currentview.body.Checknumber.visible=True
  31.             currentview.body.Depositnumber.visible=False
  32.         Else
  33.             If currentview.body.Transtype.text="Deposit" Then
  34.                 currentview.body.Checknumber.visible=False
  35.                 currentview.body.Depositnumber.visible=True
  36.             Else
  37.                 currentview.body.Checknumber.visible=False
  38.                 currentview.body.Depositnumber.visible=False
  39.             End If
  40.         End If
  41.     End If
  42.     'currentwindow.repaint
  43. End Sub
  44. '++LotusScript Development Environment:2:2:Newrecord:1:12
  45. Sub Newrecord(Source As Docwindow)
  46.     setdefaultbuttontext
  47. End Sub