This is the of the new button to report accounts with fewer than 6 remaining payments.

on mouseUp
  
  -- start by getting rid of whatever was in 
  -- card field "results"
  put empty into card field "results"
  
  put "The following accounts have fewer than 6 remaining payments: " after card field "results"
  put return & return after card field "results"
  
  -- Go through each line of card field "data" (i.e., go through
  -- each account
  repeat with i = 1 to number of lines of card field "data"
    
    -- check whether the number of remaining payments for
    -- the current account is less than 6
    
    if word 3 of line i of card field "data" < 6 then
      
      -- If the number of remaining payments for the current
      -- account is less than 6, then display the account 
      -- information
      
      put word 2 of line i of card field "data" after card field "results"
      put " " & word 3 of line i of card field "data" after card field "results"
      put " " & word 4 of line i of card field "data" after card field "results"
      
      put return after card field "results"
      
    end if
  end repeat
end mouseUp