home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l407 / 5.ddi / DATAFORM.FR_ / DATAFORM.bin (.txt)
Encoding:
Visual Basic Form  |  1993-04-28  |  22.7 KB  |  737 lines

  1. VERSION 2.00
  2. Begin Form fDataForm 
  3.    BackColor       =   &H00C0C0C0&
  4.    ClientHeight    =   2520
  5.    ClientLeft      =   1815
  6.    ClientTop       =   3000
  7.    ClientWidth     =   5700
  8.    Height          =   2925
  9.    Icon            =   DATAFORM.FRX:0000
  10.    Left            =   1755
  11.    LinkTopic       =   "Form2"
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   2520
  14.    ScaleWidth      =   5700
  15.    Tag             =   "Dynaset"
  16.    Top             =   2655
  17.    Width           =   5820
  18.    Begin CommonDialog CMD1 
  19.       Left            =   4800
  20.       Top             =   1800
  21.    End
  22.    Begin PictureBox StatBox 
  23.       Align           =   2  'Align Bottom
  24.       BackColor       =   &H00C0C0C0&
  25.       BorderStyle     =   0  'None
  26.       Height          =   270
  27.       Left            =   0
  28.       ScaleHeight     =   282.462
  29.       ScaleMode       =   0  'User
  30.       ScaleWidth      =   5710.271
  31.       TabIndex        =   6
  32.       Top             =   2250
  33.       Width           =   5700
  34.       Begin Data Data1 
  35.          Connect         =   ""
  36.          DatabaseName    =   ""
  37.          Exclusive       =   0   'False
  38.          Height          =   270
  39.          Left            =   0
  40.          Options         =   0
  41.          ReadOnly        =   0   'False
  42.          RecordSource    =   ""
  43.          Top             =   0
  44.          Width           =   5475
  45.       End
  46.    End
  47.    Begin VScrollBar cScrollBar 
  48.       Height          =   2085
  49.       LargeChange     =   3000
  50.       Left            =   7665
  51.       SmallChange     =   300
  52.       TabIndex        =   15
  53.       Top             =   630
  54.       Visible         =   0   'False
  55.       Width           =   255
  56.    End
  57.    Begin PictureBox cFields 
  58.       BackColor       =   &H00C0C0C0&
  59.       BorderStyle     =   0  'None
  60.       Height          =   1065
  61.       Left            =   0
  62.       ScaleHeight     =   1056.48
  63.       ScaleMode       =   0  'User
  64.       ScaleWidth      =   7600.262
  65.       TabIndex        =   10
  66.       TabStop         =   0   'False
  67.       Top             =   630
  68.       Width           =   7605
  69.       Begin TextBox cFieldData 
  70.          BackColor       =   &H00FFFFFF&
  71.          DataSource      =   "Data1"
  72.          ForeColor       =   &H00000000&
  73.          Height          =   285
  74.          Index           =   0
  75.          Left            =   1665
  76.          TabIndex        =   13
  77.          Top             =   0
  78.          Visible         =   0   'False
  79.          Width           =   3255
  80.       End
  81.       Begin CheckBox cFieldCheck 
  82.          BackColor       =   &H00C0C0C0&
  83.          DataSource      =   "Data1"
  84.          Height          =   282
  85.          Index           =   0
  86.          Left            =   1680
  87.          TabIndex        =   12
  88.          Top             =   735
  89.          Visible         =   0   'False
  90.          Width           =   3270
  91.       End
  92.       Begin PictureBox cFieldPicture 
  93.          DataSource      =   "Data1"
  94.          Height          =   282
  95.          Index           =   0
  96.          Left            =   1680
  97.          ScaleHeight     =   255
  98.          ScaleWidth      =   3240
  99.          TabIndex        =   11
  100.          Top             =   315
  101.          Visible         =   0   'False
  102.          Width           =   3270
  103.       End
  104.       Begin Label cFieldName 
  105.          BackColor       =   &H00C0C0C0&
  106.          ForeColor       =   &H00000000&
  107.          Height          =   255
  108.          Index           =   0
  109.          Left            =   105
  110.          TabIndex        =   14
  111.          Top             =   0
  112.          Visible         =   0   'False
  113.          Width           =   1575
  114.       End
  115.    End
  116.    Begin PictureBox FieldHeader 
  117.       Align           =   1  'Align Top
  118.       BackColor       =   &H00C0C0C0&
  119.       BorderStyle     =   0  'None
  120.       Height          =   300
  121.       Left            =   0
  122.       ScaleHeight     =   300
  123.       ScaleMode       =   0  'User
  124.       ScaleWidth      =   5703.403
  125.       TabIndex        =   7
  126.       Top             =   330
  127.       Width           =   5700
  128.       Begin Label FieldValueLabel 
  129.          BackColor       =   &H00C0C0C0&
  130.          Caption         =   " Value:"
  131.          Height          =   252
  132.          Left            =   1680
  133.          TabIndex        =   9
  134.          Top             =   30
  135.          Width           =   2652
  136.       End
  137.       Begin Label FieldHdrLabel 
  138.          BackColor       =   &H00C0C0C0&
  139.          Caption         =   "Field Name:"
  140.          Height          =   252
  141.          Left            =   120
  142.          TabIndex        =   8
  143.          Top             =   30
  144.          Width           =   1212
  145.       End
  146.    End
  147.    Begin PictureBox TopPic 
  148.       Align           =   1  'Align Top
  149.       BackColor       =   &H00C0C0C0&
  150.       BorderStyle     =   0  'None
  151.       Height          =   330
  152.       Left            =   0
  153.       ScaleHeight     =   330
  154.       ScaleWidth      =   5700
  155.       TabIndex        =   0
  156.       Top             =   0
  157.       Width           =   5700
  158.       Begin CommandButton CancelAddBtn 
  159.          Caption         =   "C&ancel"
  160.          Height          =   330
  161.          Left            =   0
  162.          TabIndex        =   17
  163.          Top             =   0
  164.          Visible         =   0   'False
  165.          Width           =   960
  166.       End
  167.       Begin CommandButton RefreshBtn 
  168.          Caption         =   "&Refresh"
  169.          Height          =   330
  170.          Left            =   3780
  171.          TabIndex        =   16
  172.          Top             =   0
  173.          Width           =   960
  174.       End
  175.       Begin CommandButton FindBtn 
  176.          Caption         =   "&Find"
  177.          Height          =   330
  178.          Left            =   2835
  179.          TabIndex        =   5
  180.          Top             =   0
  181.          Width           =   960
  182.       End
  183.       Begin CommandButton CloseBtn 
  184.          Cancel          =   -1  'True
  185.          Caption         =   "&Close"
  186.          Height          =   330
  187.          Left            =   4725
  188.          TabIndex        =   4
  189.          Top             =   0
  190.          Width           =   960
  191.       End
  192.       Begin CommandButton DeleteBtn 
  193.          Caption         =   "&Delete"
  194.          Height          =   330
  195.          Left            =   1890
  196.          TabIndex        =   3
  197.          Top             =   0
  198.          Width           =   960
  199.       End
  200.       Begin CommandButton AddBtn 
  201.          Caption         =   "&Add"
  202.          Height          =   330
  203.          Left            =   0
  204.          TabIndex        =   2
  205.          Top             =   0
  206.          Width           =   960
  207.       End
  208.       Begin CommandButton UpdateBtn 
  209.          Caption         =   "&Update"
  210.          Height          =   330
  211.          Left            =   945
  212.          TabIndex        =   1
  213.          Top             =   0
  214.          Width           =   960
  215.       End
  216.    End
  217. '============================================================================
  218. ' This is a fairly generic form that can be used in most cases with any
  219. ' table. I am sorry if it is confusing. There is a lot of paths to
  220. ' keep track on with adding, editing, browsing, deleting records
  221. ' on populated as well as empty tables. I have added flags where I
  222. ' felt there was no other way to achieve the correct functionality.
  223. ' I am sure that you can improve this form greatly with a little
  224. ' time and understanding of your spcific needs. There is also some
  225. ' recursion that could be trapped but hopefully, the form will be
  226. ' a good starting point for any data control app.
  227. '============================================================================
  228. Dim FldArr() As control
  229. Dim FDS As dynaset
  230. Dim FBM As String                  'form global bookmark
  231. Dim numFlds As Integer
  232. Dim CurrField As Integer
  233. Dim CurrRec As Long
  234. Dim TotRec As Long
  235. Dim JustUsedFind As Integer        'flag for find function
  236. Dim fResizing As Integer           'flag to avoid resize recursion
  237. Dim CancelFlag As Integer          'flag to cancel an addnew
  238. Dim FldTop As Integer
  239. Const EM_NOTHING = 0
  240. Const EM_EDIT = 1
  241. Const EM_ADDNEW = 2
  242. Const FT_TRUEFALSE = 1
  243. Const FT_BYTE = 2
  244. Const FT_INTEGER = 3
  245. Const FT_LONG = 4
  246. Const FT_CURRENCY = 5
  247. Const FT_SINGLE = 6
  248. Const FT_DOUBLE = 7
  249. Const FT_DATETIME = 8
  250. Const FT_STRING = 10
  251. Const FT_BINARY = 11
  252. Const FT_MEMO = 12
  253. Const YES = 6
  254. Const MSGBOX_TYPE = 4 + 48
  255. Sub AddBtn_Click ()
  256.   On Error GoTo AddErr
  257.   Data1.Recordset.AddNew
  258.   Data1.Caption = "New Record"
  259.   CancelAddBtn.Visible = True
  260.   AddBtn.Visible = False
  261.   If Data1.Recordset.RecordCount <> 0 Then
  262.     FBM = Data1.Recordset.Bookmark
  263.     FldArr(0).SetFocus
  264.   End If
  265.   GoTo AddEnd
  266. AddErr:
  267.   MsgBox Error$
  268.   Resume AddEnd
  269. AddEnd:
  270. End Sub
  271. Sub CancelAddBtn_Click ()
  272.   On Error Resume Next
  273.   CancelFlag = True
  274.   If FBM <> "" Then
  275.     Data1.Recordset.Bookmark = FBM
  276.   End If
  277.   If FDS.RecordCount > 0 Then
  278.     SetRecNum
  279.   End If
  280. End Sub
  281. Sub cFieldData_KeyPress (Index As Integer, KeyAscii As Integer)
  282.   'go to next field on an enter keypress
  283.   If KeyAscii = 13 Then
  284.     KeyAscii = 0
  285.     SendKeys "{Tab}"
  286.   End If
  287. End Sub
  288. Sub cFieldPicture_Click (Index As Integer)
  289.   'this toggles the size of a picture control
  290.   'so it mat be viewed or compressed
  291.   If cFieldPicture(Index).Height <= 280 Then
  292.     cFieldPicture(Index).AutoSize = True
  293.   Else
  294.     cFieldPicture(Index).AutoSize = False
  295.     cFieldPicture(Index).Height = 280
  296.   End If
  297. End Sub
  298. Sub cFieldPicture_DblClick (Index As Integer)
  299.   On Error GoTo PicErr
  300.   CMD1.Filter = "Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Metafiles (*.wmf)|*.wmf|All Files (*.*)|*.*"
  301.   CMD1.DialogTitle = "Select a Picture File to Load"
  302.   CMD1.FilterIndex = 1
  303.   CMD1.Action = 1
  304.   If CMD1.Filename <> "" Then
  305.     cFieldPicture(Index).Picture = LoadPicture(CMD1.Filename)
  306.   End If
  307.   GoTo PicEnd
  308. PicErr:
  309.   MsgBox Error$
  310.   Resume PicEnd
  311. PicEnd:
  312. End Sub
  313. Sub CloseBtn_Click ()
  314.   On Error Resume Next
  315.   Unload Me
  316. End Sub
  317. Sub cScrollBar_Change ()
  318.   Dim t As Integer
  319.   t = cScrollBar
  320.   If (t - FldTop) Mod 300 = 0 Then
  321.     cFields.Top = t
  322.   Else
  323.     cFields.Top = ((t - FldTop) \ 300) * 300 + FldTop
  324.   End If
  325. End Sub
  326. Sub Data1_Error (DataErr As Integer, Response As Integer)
  327.   MsgBox "Data error event hit err:" + Error$(DataErr)
  328. End Sub
  329. Sub Data1_RePosition ()
  330.   Dim bm As String
  331.   Dim ds As dynaset
  332.   If Data1.Recordset.RecordCount = 0 And Data1.EditMode <> 2 Then
  333.     Call AddBtn_Click
  334.     Exit Sub
  335.   End If
  336.   If JustUsedFind = True Then
  337.     Set ds = Data1.Recordset.Clone()
  338.     bm = Data1.Recordset.Bookmark
  339.     ds.MoveFirst
  340.     CurrRec = 1
  341.     While ds.Bookmark <> bm
  342.       CurrRec = CurrRec + 1
  343.       ds.MoveNext
  344.     Wend
  345.     JustUsedFind = False
  346.   End If
  347.   SetRecNum
  348. End Sub
  349. Sub Data1_ValidatThe)ldPox Error$
  350.   Resu
  351.    nd Find = False
  352.  rrRec = CurrRec +
  353. Sub Data1_Val 0 Then
  354.     cFie Data1.Recor==========
  355. DimdBtn_Clic 'this toggles a1.Recor=End Sub
  356. Sub Dad.Movure oki0w4 size of a pictur
  357.    nd F
  358.     vent hit err:" + ng, ordsd If
  359.   SetRecN
  360.     0
  361. Const EMs Integs IntegerwRecoEMs erwR.RecordCount <>nst EMs a pictur
  362.    nd F
  363. Bitmaps (*.bmp)|*RY = 11
  364. Const FT
  365. Su(=EMs I
  366. End Sub
  367. Sub 2nd F
  368. Bitmaps (*.bx Error$
  369.    co Then
  370.     Call ArRec +
  371. Sub Data co Then
  372.     Cat Sub
  373.   End If
  374. a = 2
  375. SuDatind   MInd
  376. Dim FBM As Str
  377.     Wend
  378.  tend If
  379.   ex).Heightd
  380. Dim Feightd
  381. rRec + 1
  382.   "*at Sub
  383.   EMs I
  384. End Subr:"but hre(Iption =Then
  385.     Cat Sub global bookmarkfSub  cFie Data1.ReE B    Caes a1.Recor=End - FldTop) \ 30Sub Data1_ValidatThe)ldPox Error$
  386.   Resu
  387.    nd Find = False
  388.  rrRec = CurrRec +
  389. Sub Data1_Val 0 Then
  390.     cFie Data1.Recor==========
  391. DimdBtn_Clic 'this toggles a1.Recor=End Sub
  392. Sub Dad.Movure oki0w4 size of a pictur
  393.    nd F
  394.     vent hit err:" + ng, ordsd If
  395.   SetRecN
  396.     0
  397. Const EMs Integs IntegerwRecoEMs erwR.RecordCount <>nst EMs a pictur
  398.    nd F
  399. Bitmaps (*.bmp)|*RY = 11
  400. Const FT
  401. Su(=EMs I
  402. End Sub
  403. Sub 2nd F
  404. Bitmaps (*.bx Error$
  405.    co Then
  406.     Call ArRec +
  407. Sub Data co Then
  408.     Cat Sub
  409.   End If
  410. a = 2
  411. SuDatind   MInd
  412. Dim FBM As Str
  413.     Wend
  414.  tend If
  415.   ex).Heightd
  416. Dim Feightd
  417. rRec + 1
  418.   "*at Sub
  419.   EMs I
  420. End Subr:"but hre(Iption =Then
  421.     Cat Sub global bookmarkfSub  cFie Data1.ReE B    Caes a1.Recor=End - FldTop) \ 30Sub Data1_ValidatThe)ldPox Error$
  422.   Resu
  423.    nd Find = False
  424.  rrRec = CurrRec +
  425. Sub Data1_Val 0 Then
  426.     cFie Data1.Recor==========
  427. DimdBtn_Clic 'this toggles a1.Recor=End Sub
  428. Sub Dad.Movure oki0w4 size of a pictur
  429.    nd F
  430.     vent hit err:" + ng, ordsd If
  431.   SetRecN
  432.     0
  433. ConstIntegs
  434.     Wend
  435.  tend of  0
  436. ConstIntegs
  437.     N
  438.     0
  439. FBM = Data1.Re Re ri1.Re Re ri1.Re Re71.Re gs Integ nten   Cona1.Recor=End Sub
  440. stIor
  441.       Currr
  442.       Currr
  443.    na1.Rece    Currr
  444.    na1.   eece  e  bkmark =  = Datas1.Fi
  445. DimdBtn_Clic ' r R sum    bm = d Fie71.Reet
  446.   c ' r R sum    bmic ta1.Re Re ri1.Re erwR.    Re rifRecrRec tol
  447.     While ds.Bo .Re = C ub Ddsd IcfSDR
  448.       CurrRec = 
  449.   .Rece    Currr
  450. Su(=EMs I
  451. End Sf a ut datTht E
  452.   If CMD1.File.    Re rifRecrRe R sum    bmic tawR.ata1_ValidatThe)le erwR.    Re rifhe)lee rifhe)lee rifhel Re Data)leelDsiDiDiDiDiDiDiDiDiDi tend If
  453.   ex)db ciDiDiDiDiDi tend lfBhre(Ipen
  454. FBM re(la1.Recor=============l Bey   Cpictud==l Be     =l Be     =l Be   
  455. S e  irrRec = CurrRec +
  456.     vrr
  457.    na1.   eeeeeeeeeeeeeeeeeee=====o)
  458. T    =l Be    I    Cd    Cd    Cd    Cd Sub
  459. stIor
  460.      ode <> Bey   Cpictud==l e 3 sseae Re71.Re gs Intea1.Recordset.CCurCpictud==l e 3 ss    d==l e 3 ss    d= ta1.ecrRe R sueclc Filepic ua =cDln.xS te  =l R sueclc FilepicorRe R s   d= ta1.ecrRe Rdsett hithe)ldPox Error$
  461.  global bf=l Be     =l Be  
  462. DimdBtn_Clic 'hithe)ldPox End Ifl bsVxug)ldPem     Currr
  463.     Cat Sub global b2  Cd Sub
  464. stxug)ldPem     Cur Re rifRecrRec to.bx ErCat RecordsetifRecEnd - FldTop) \ 3cEnd - FSub
  465. stIor
  466. 3 T6e 3 ssea(RPox d 3cEnd - Fce    Crk 1Sub dtetRecN
  467. ta1_VrRex Error$
  468.  glo hitheln
  469.     Cat Sub glctur
  470. stxug)ldPem  b
  471. stxugta1_VrRex Error$
  472. stIor
  473.      o.TtIortd
  474. rRec += CurBtn   =l Be   
  475. S etIor
  476. 3 T6e 3 sseaoF
  477. Bt RecordsetifRecEpb Dat RecordsetifRecE
  478. ConsRecordFldTop) \ 3cEnd - + 1
  479.   "*at Sub
  480.  ri1.setd If
  481.   rRec to.bx ErCat urBtn   =l Be   2ee=noex Erro
  482.   End If
  483. a = 2ad Sf a ut detifRecE.hlm.lr=l ******hg
  484.    Error$
  485. sf*hg
  486.    EConst FT
  487. mce  r
  488.      o0Iortd
  489. rRec += Curoubr:"but hre(IptildTop) \ 3cildTopat Sub
  490.  ri1.setd Be   2ee=noexMBe    Idata1_Val 0 Tr    erwR.RecordCount Cd Sub
  491. stIor
  492.    or
  493.    or
  494.  ri1.setd If
  495.  at Sub global boo Curoubr**** B    Caes Sf a  Caes a1Cd    Cd    Cd SuDiDi  Wend
  496.  tend If
  497.  ErrorxiDiDiDiDi t
  498. Sub Data1_ValidmapsData1.ReE Bo Then
  499.   b  cFie Data1.ReEt hre Sub
  500. Sub urrR   Cat Sub
  501. vure oki0w4 size uDatix End Ifl bsVEx End Itd
  502. rRec += 
  503. c ta1.Re Re ri1.RDi t
  504. Sub Data1_Vb DaldTopat Sub
  505.  ri1= False
  506.  rrRec =hre Sub
  507. Sub7eub
  508. vurd    Cd SuDiDi  Wrror tend of  0
  509. ConsuDatix FT
  510. mce  ri  Wrror t.ReE Bo Then
  511.   bDiDe    Currr
  512.     cE
  513. ConsRecordFldTub
  514.   End If
  515. a =ys Sfea1_Val 0 The Cd SuDiDi  Wend
  516. ri1.R'RpN.4f Sf
  517. stxug)ldPem     drrr
  518.    na1.   eecta1_Vb
  519. Sub7eub
  520. vurd   End d IcfSDR
  521.       CuOE_N-Caes Sf a  Caes atheln
  522. E_N-vured d IcfSDR
  523.       Erroictud==d Sfud=|ub
  524.      CuOE_N-Caes Sf r:" + nError$
  525.  global b     eecta1_Vb
  526. onsRecordFldTub
  527.     0
  528. FBM = c  EMsa  Caes a1Cd    CstIor
  529.       Currrd Itd
  530. DimdBtn_CCount <"cs r
  531. Sub7eub
  532. s Sfea1_Val nurolu fl d If
  533.  ErrorxiDiDs I
  534. ERecoEMDiDiDi
  535. ERecoEMDiDiDd Sub
  536. stIorrd   E hit err:rrr
  537.  SuDiDi  Wend
  538. ri1.imdBtn_CCount <"c  =l Be  
  539. DimdB (*.iDi
  540. ERecoEM  Cat Sub glctur
  541.  fl simdBtn_CCount <"cBtn_CCount <"cBtn    Cu1  = Datas1.Fi
  542. DSu(=EMs I
  543. End Sfo Re rifRecrRec toc.setd Be   2ee=noa1.ReE Bo(*.iDndLe*.iddlfg8sesch <"c  =l BN
  544. ta1_VrRex p))mic t   End d IcfSDR
  545.  ten   Cetd
  546. pBiRan1.Fi
  547. DSTiHi&ctur
  548. Suc  =l B t.ReE Bo Tldror Cona1.Recor=End nt hit err:"aes atheln
  549. E_N-vuS eti')'.Reix uit err.6e 3 nD= cIf
  550. a =ys Sfea1_Vclc Filepic1.Fic1c.dttaxeNRecr'hithe)ldpic1.Fic
  551. S eatheln
  552. Iortd
  553. rRec += CurnoexMBe    Idataub
  554. g iP=l Be   2eeseap Then
  555.   b  cFie b
  556.   End If
  557. a = R sueclc Filepic   =l Be  
  558. DimdB    Re rifRecrRecic t obal b2  CdSf a ut detifRec   2eeseap Then
  559.     N
  560.     0
  561. Filepic1.FicRecoEMDiDiDd Sub
  562. atThe)le 
  563. Sub7RCount <"c  =l Be $
  564. stIo $
  565. stIo $
  566. stIo e (sEe2o3cEn    o0Iortd
  567. rRec Then   =tIo $
  568. c   2eeseap TRecE.hlm.lr=l * d IcfSDR
  569.       En    o0Iortd
  570. rRec EMsa  Caes 7(sEe  2eeseap TRecE.heeMreoepicorR 2eeseap TRecE.heR$
  571. -Lg Coseap Then
  572.   cE.heR$
  573.  tend o
  574.     0
  575. FBM   0
  576. FBM    togglrxiDiDiDiDi t
  577.    or0
  578.    ta1_ValiDi t
  579.    or0
  580. GCp"BCurnoexMBe    IdaBMtHSur
  581.    or0
  582. GCp"BCS eti')'.Reix uit   2eeMBe    Ida e (sEe2o3cEn  fl simdBtn_CCounhitheln
  583.     Cat 0 Idataub
  584. g im =  Caes 7(sEe  2eesS eatheln
  585. Iortd
  586. r ri1.setd Be     2eeseap ThenFilepicorRe R s  eseap TRecE.hlm.lrro
  587.   End If
  588.  ri1_nFilepicorReeap TRecE.hlm.lrrb7RCount <xugta1rrr
  589.  SuDiDi  CdSf a ut detifRec   2eeseap Then
  590.     N
  591.     0
  592. Filepic1.FicRecoEMDiDiDd Sub
  593. atThe)le 
  594. Sub7RCount <"c  =l Be $p ThenPem  dE"<"c eifRecrRec tol
  595.   fl simdBtn_CCount t trin_CCount t trin_Cepicopic   n   4f Sf
  596. stxug)ldPemrin_CCount t trin 
  597. Sub7RCoFi
  598. DSu(=EMs I
  599. to.bxRecordselfaSuba"  
  600. Se.bxR    bmic tawc CdSdetifR Ida e (cordselfaSurdCoustxug)ldCoucor=End nt hit er CuOE_N-Caes Sf r DiD da e (cor:rrr
  601.  S 2ee=noexaes Sf r DiD da e3oes  c +=   =====F 2e2e2e2e2e2e2e2e2e2i  = c  EMsa  Caes apic=End nt hit er Cuhitid Be   2ee=noa1.R    Be d.rCcE.oEMsa ti')'.Rei or0
  602. GCp"BCurnoexseap TRRRRR3odcnd d IcfSDR
  603.  ten dcnd    CCp"BCurnoexCd iCd d Sub
  604. st3odcnd d IcR3odcnd d IcfSDR
  605. e d.rCcE.oEMsa tio
  606. e SNd dcn  or.ReDordseB eDooooo'oOx uit err.6e 3 nDr=En uit da e.oo'o .eci  Wend
  607.  tend Ifodcnd d IcR3odcndoeci dcndoecp Then
  608.     N
  609. s   d= ta1.ecrRe  .ecdio
  610. e SNd dcn  or."+clic 'hithfl bsVcs   d= ta1.ecrRe ('lTmMDiDiDd Sub.RDi Sub.BorR    Bend d IcR3odcnd d d of  03odcnd d d of  03"<"c eifRecnd nt hit e4nl(ahen"oend    CCp"BCurnoent Cd Sub
  611. stIor
  612.   dcn 2eeMBe    IdYa1  eecta1_Vbcnd d d of   Then
  613. A_l_pSash
  614. rRe of  03"<"c eifRereDooooo'oOxB efud=|ub
  615. fec EMsa  Caes 7(s
  616. to efud=|ub
  617. fCaes oooo'oOxB efud=|uud=|ub
  618. ooo'oOxB efud=|uu CuOE_N-Caessf
  619.  aefud=|uu OsReix uit   2elfaSuba"  
  620. Sbix uEMDdFevD8EoE_N-Ca.RDi Sub.BorR   ub7RCoi   2eeM CCp"o Curoubr**** B  .6e .eci  Wend
  621.  tend Mwce2o3c**** BM CCdgdgdgdgdghrb.BorR    Bend d t err.l(ahen"oend    CC
  622. a =ys Sfea1_VclM C Mwce2o3c**** BM  t trin 
  623. S6rReIcR3n ltR Cu|uu C'lTmMDind Mwce2o3c**** Booo'oOxBoD3n ltMDind Mwce2o3c***s   d= ta1.ecrRe hM C t  fmr(do'oOxcnd    CCp"BCurno_l_h= ta1.ec0tMDdDi
  624. ERecefud=|ub
  625. fec EMsoun   o   2elfaSuba"  
  626. SBooo'oOxBoD3n ltMurn1_VclM C Mwce2o3c"  
  627. SBooo'oOxBoD3
  628.   b tR Cu|uu C'lTmMDrin 
  629. Sub7e) Rec
  630. vurd    Cd SuDiDBM CCd
  631. S6rReIcR3n ltR CSuDiDBR    BeeFoolepic1.FicRec71dB3huu eFoolepiccR3n ltR Cu|.enFilep=l Be   2eeseap TM   0
  632. FBM    toggfMn  2elfaSuba" (do'oOxcnd    CCpof  03"Suba"  
  633. SBooo'oOxsUgUu f= ta1.ec0tMDdDi
  634. Ei da    Cu C'lTm
  635. ERecoEMDi etida   OxsUgUu     Ideecta1_Vbcnd d d     Cu 0 The Cd SuDiDi nd Mwc =lco)wmBorR   ub(sEe2o3cEn  fl si of   Then
  636. Aor3 yReixC_CCo d d ofrrb7RCount <xugtai
  637. Ei da    Cu C'lNTo d d oeeap TRe7SoexR    CCpof  03"Suba"   ub(sEeoolepiccR3n8Eo2  CdSDi rddc t f  mMDrin 
  638. Sub7e) ReEMDi etida   OxsUodCu Foexaes Sf r DiD dE'oOxcnd    f r Ddoecp Then
  639.   eVcs   d= ta1.ecrRga1rti')'.Rei or0
  640. GCpCp"BCurno_l_h    CCp"BCurnoexCR    Bend d t err_N-Caessf
  641.  aefudoubr*
  642. Ei da    Cu C'lTc"  
  643. nd6rWNs oe g
  644. s l(ahen"oend    CCBorR  Sr(dbm=ldhmN**** BM  t trin 
  645.  Wen    CCp"BCurnoentCCp"(en  .imdBtn   ub(sEe2o3cEn   Cat 0 Idataub+r=EndFie b
  646.   End If
  647. DtEcrRga1rEnd If
  648. dhmN**** BM  t troMDind Mwce2 BM  t troMDind Mp"BCb+r=EndFie b
  649. nd M****  CaeBCb+r=EndFie b
  650. nd= ta1.ecrlBCnoR hM C tiat 0 Idataub+S*  C  
  651. nd6rWNs oe g
  652. soMDindurnoexCR    Bend ub(MDiDVcs   d= ta1.ecrRIf
  653. dhmN**** BM  t=|ubo_pSash
  654. rRe of  0-BoR hM C tiat rT(Dooooc oOx  Be d.rCcE.oEMsaic1.FicRecoEMDiDiEddc t f  mMDrin 
  655. 3odcnd d d lcR3odcndoece  .imdBtn  a l0e   Cuesea  Cue  a l0e   Cuesea 
  656. nd='oOxB efud=|uu Cudb.oTe Cd Sa 
  657. ntn  a l0e   CueseThen
  658.     N
  659.  gs(Dooooccta1_Vbcnd d d   6rWNsn
  660.     N
  661. =|uu Cudb.oTe Cd e ('l  t tritin  fl sim   ub(sEe2o3t tp TRecE.heR$
  662.  gsd nt hit e4nl(ahe)mdB f
  663.  aefud=cndoece  .imdBtn "BCurno_l_h    CCrRga1rti')'.Rei ocCcE.oD3
  664.   b tR Cu|uu C   Then
  665. Aor3 yRei
  666. to.bxBtn  a l0eCaeBCc***s )'.Rei ocCcE.oDCaes oooo'oOxB efd d oeeap oitiR3n TRecc=End 2e2e2e2p Then
  667.  "BCurnoten dcohMDind ocCcE.oDCaes oooo  d= ta1.ecraI i maes Sf r DiR3odcndoedl2cfReecoEMos oe nl(ahe)mdB f
  668.  aeifRe Bed ocC o  2cfRe   f r Ddoecp TL  Then
  669. AorDiDd Sub
  670. atThe)le    r ri1.setd eC oBend d t err_N-CasOepcceC oes oogce2o3c**** Booo'oceC ERen
  671.     N
  672.  gGcn 2tEcrRga1rEnd If
  673. d    B.imdBtn    N3"<"c eifRecnd  f r Ddoecp.imdseap TRRRRR3odcnd*** BM  t trin 
  674. Smdseapd t errt err 
  675. Smdscnd*** BM  t trinohp TReccf
  676.  aefudoubr*
  677. E gGcn 2tEcrRga1rEdDi
  678. Edoecp TL  Then
  679. AoGcn ud=|uN-CasOepcceC oes CeectcoEMos c"  
  680. SBomCasOeloxC_CCoThe Cd a 
  681. 2tEcrR  N
  682.  gs(DoooocasOeloxC_CCoThe C err 
  683. Smdscnd*** he eu F 
  684. SBmdscnd*** BMdl2cu eFoolepioE_N-Ca.RR3odcnd TM moeeap oiti(Doooooh b tR R Ce)mdB f
  685.  aeifRe  T-HSubaseap TohoEMos   d=db.oT f  mMDrin 
  686. 3oimdlepiccR3n ltR Cu|s
  687.   r=En uien
  688. Aor3 yRe
  689.   r=En uien
  690. Aor3eE
  691. Ao 03"<"c ehoEMos   d=db.oT ecp * Bod IcR3odcnta1.ecrRe  cecrRIf
  692.  r Ddoecp Then
  693.  grRe uieorR    Bend d t end d t err_N-CaedDR
  694. e d.rCc t err_N-CaedDRnd d I_N-CaOepcceC oes oogce Cd SuDiDBM CCd
  695. stIor
  696.   dcn uDiDBR    IdYa1  eecta1FicRec d d of   Then
  697. A_ccR3n h
  698. rRe of  03"<"c  Be   eDooooo'oOxB efudM    tfec EMsa  Caes 7(" (do'efud=|ub
  699. fCaes o03"SubxB efud=|uud=|ub
  700. Uu f= xB efud=|uu CuOE_da    sf
  701.  aefud=|uu Osi etidit   2elfaSuba"  deectauEMDdFevD8EoE_N-Cu 0 ThSub.BorR   ub7RCoc =lcoeM CCp"o Curoubr*o3cEn  .6e .eci  Wend
  702. Aor3 yMwce2o3c**** BM Crb7RCogdgdghrb.BorR        Cu t err.l(ahen"oen TRe7SC
  703. a =ys Sfea1_Vc"Suba"wce2o3c**** BM  tR3n8Eo
  704. S6rReIcR3n ltR C  mMDr'lTmMDind Mwce2o3 etidaBooo'oOxBoD3n ltMes Sf wce2o3c***s   d=   f r rRe hM C t  fmr(d eVcs nd    CCp"BCurno_ti')'.a1.ec0tMDdDi
  705. ERecrno_l_ub
  706. fec EMsoun   CR    lfaSuba"  
  707. SBooo'essf
  708. 3n ltMurn1_VclM C    Cuo3c"  
  709. SBooo'oOxB oe g
  710. b tR Cu|uu C'lTmMCCBorRSub7e) Rec
  711. vurd  * BM  uDiDBM CCd
  712. S6rReICp"BCutR CSuDiDBR    BemdBtn pic1.FicRec71dB3hCat 0 olepiccR3n ltR Cub
  713.   Elep=l Be   2eeseaEnd If 0
  714. FBM    toggfMnroMDinaSuba" (do'oOxcndMDind pof  03"Suba"  
  715. nd M*OxsUgUu f= ta1.ecFie b
  716. Ei da    Cu C'l hM C coEMDi etida   Ox  C  
  717.     Ideecta1_Vbcnindurn    Cu 0 The Cd SMDiDVcnd Mwc =lco)wmBor
  718. dhmN*(sEe2o3cEn  fl siash
  719. rRThen
  720. Aor3 yReixC_tiat rd ofrrb7RCount <xd.rCcEEi da    Cu C'lNTEMDiDioeeap TRe7SoexR  
  721. 3odcnf  03"Suba"   ub(ce  .iepiccR3n8Eo2  CdSesea  c t f  mMDrin 
  722. Suea 
  723. ndeEMDi etida   Oxsudb.oTFoexaes Sf r DiD 0e   Ccnd    f r DdoecpN
  724.   eVcs   d= tnd d dRga1rti')'.Rei or N
  725. =|up"BCurno_l_h    C'l  t rnoexCR    Bend dub(sEe_N-Caessf
  726.  aefud$
  727. -LgEi da    Cu C'lTcl(ahe)6rWNs oe g
  728. s l(ahoece  d    CCBorR  Sr(d_h    mN**** BM  t trin ocCcE    CCp"BCurnoent C   Tn  .imdBtn   ub(sbxBtn En   Cat 0 Idatau)'.ReidFie b
  729.   End If
  730. o'oOxBRga1rEnd If
  731. dhmN*R3n TR  t troMDind MwceThen
  732.  t troMDind Mp"BCbind ocFie b
  733. nd M****  Cd= ta1r=EndFie b
  734. nd= tar DiR3BCnoR hM C tiat 0EMos oub+S*  C  
  735. nd6rWNaeifRe
  736. soMDindurnoexCR    f rd ub(MDiDVcs   d=AorDiD
  737.