home *** CD-ROM | disk | FTP | other *** search
- global hulp, searchmode, zoekveld, zoekwaarde, FirstRecNr, zoeklijst, zoekrecnr, leeg
-
- on mouseUp
- searchmode = 0
- leeg = 0
- set the visible of sprite 35 to 0
- set the visible of sprite 38 to 0
- set the visible of sprite 39 to 0
- set the visible of sprite 40 to 0
- set the visible of sprite 101 to 0
- member("filter").text = "[ZOEKMODUS]"
- sendAllSprites(#MasterRollActivate)
- sendAllSprites(#MasterRollDisable)
- if linePosToLocV(member("tekstdummy"), locVToLinePos(member("tekstdummy"), the height of sprite 5)) > 0 then
- sendAllSprites(#Enable)
- else
- sendAllSprites(#disable)
- end if
- sendSprite(36, #MasterRollDeActivate)
- sendSprite(37, #MasterRollDeActivate)
- sendSprite(36, #MasterRollHide)
- sendSprite(37, #MasterRollHide)
- if hulp then
- sendAllSprites(#mtogglehelp)
- end if
- updateStage()
- DBQuery(EMPTY)
- FirstRecNr = 1
- zoekwaarde = the text of field "zoektext"
- if (zoekveld = "TIPNR") and (zoekwaarde <> EMPTY) then
- zoekwaarde = ForceUppercase(the text of field "zoektext")
- if DBGo(integer(zoekwaarde)) = 0 then
- GetRecord()
- else
- EmptyRecord()
- end if
- else
- if (zoekveld = "TITEL") and (zoekwaarde <> EMPTY) then
- zoekwaarde = ForceUppercase(the text of field "zoektext")
- DBTop()
- querystring = "'" & zoekwaarde & "'$UPPER(TITEL)"
- if DBQuery(querystring) = 0 then
- FirstRecNr = DBCurrRecNum()
- GetRecord()
- else
- EmptyRecord()
- DBQuery(EMPTY)
- FirstRecNr = 1
- end if
- else
- if (zoekveld = "TEKST") and (zoekwaarde <> EMPTY) then
- searchmode = 1
- zoekrecnr = 1
- DBTop()
- zoeklijst = []
- if DBFindMemo("TEKST", zoekwaarde) = 0 then
- append(zoeklijst, DBCurrRecNum())
- end if
- repeat while DBSkip(1) = 0
- if DBFindMemo("TEKST", zoekwaarde) = 0 then
- append(zoeklijst, DBCurrRecNum())
- end if
- end repeat
- if count(zoeklijst) = 0 then
- searchmode = 0
- EmptyRecord()
- DBTop()
- else
- zoekrecnr = 1
- DBGo(getAt(zoeklijst, 1))
- GetRecord()
- end if
- else
- searchmode = 0
- if the number of member the text of member "TIPNR" = -1 then
- sendSprite(6, #MasterRollDeActivate)
- else
- sendSprite(6, #MasterRollActivate)
- end if
- DBTop()
- member("filter").text = " "
- GetRecord()
- end if
- end if
- end if
- end
-