home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 November / Pcwk1197.iso / LOTUS / Eng-ins / SMASTERS / APPROACH / CHECKBK.MPR / SCRIPT / ApproachDoc / CheckWindow.s (.txt) < prev    next >
Null Bytes Alternating  |  1997-01-09  |  6KB  |  68 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 source.activeview.name = "Data Entry Screen" Then
  20.         If source.activeview.body.commitflag.text="1" Then
  21.             source.activeview.body.voidbutton.text="Remove this transaction from the balance"
  22.         Else
  23.             source.activeview.body.voidbutton.text= "Apply this transaction to the balance"
  24.             Messagebox("You must apply this transaction to the balance before you may go on to another record.")
  25.         End If    
  26.         If source.activeview.body.transtype.text="Check" Then
  27.             source.activeview.body.checknumber.visible=True
  28.             source.activeview.body.depositnumber.visible=False
  29.         Else
  30.             If source.activeview.body.transtype.text="Deposit" Then
  31.                 source.activeview.body.checknumber.visible=False
  32.                 source.activeview.body.depositnumber.visible=True
  33.             Else
  34.                 If source.activeview.body.transtype.text="ATM Withdrawl" Then
  35.                     source.activeview.body.checknumber.visible=False
  36.                     source.activeview.body.depositnumber.visible=False
  37.                 End If
  38.             End If
  39.             'source.activeview.body.checknumber.visible=True
  40.         End If
  41.     End If
  42. End Sub
  43. '++LotusScript Development Environment:2:2:Newrecord:1:12
  44. Sub Newrecord(Source As Docwindow)
  45.     If source.activeview.name = "Data Entry Screen" Then
  46.         If source.activeview.body.commitflag.text="1" Then
  47.             source.activeview.body.voidbutton.text="Remove this transaction from the balance"
  48.         Else
  49.             source.activeview.body.voidbutton.text= "Apply this transaction to the balance"
  50.             Messagebox("You must apply this transaction to the balance before you may go on to another record.")
  51.         End If    
  52.         If source.activeview.body.transtype.text="Check" Then
  53.             source.activeview.body.checknumber.visible=True
  54.             source.activeview.body.depositnumber.visible=False
  55.         Else
  56.             If source.activeview.body.transtype.text="Deposit" Then
  57.                 source.activeview.body.checknumber.visible=False
  58.                 source.activeview.body.depositnumber.visible=True
  59.             Else
  60.                 If source.activeview.body.transtype.text="ATM Withdrawl" Then
  61.                     source.activeview.body.checknumber.visible=False
  62.                     source.activeview.body.depositnumber.visible=False
  63.                 End If
  64.             End If
  65.             'source.activeview.body.checknumber.visible=True
  66.         End If
  67.     End If
  68. End Sub