Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.53 KB  |  hits: 33  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. LOCAL myear    
  2. myear=thisform.combo1.value
  3.  
  4. SELECT ppmp_ngas, acc_no, SUM(amount) AS amount FROM ppmp ;
  5. WHERE YEAR(date) = myear ;
  6. AND acctype like "%MOOE%" INTO CURSOR ann GROUP BY ppmp_ngas
  7. SELECT ann
  8.  
  9. SELECT tempannual
  10. DELETE ALL
  11.  
  12. GO top
  13. DO WHILE !EOF()
  14.   mgas=ppmp_ngas
  15.   DO whil mgas=ann.ppmp_ngas
  16.      SELECT tempannual  
  17.      APPEND BLANK
  18.      replace ppmp_ngas WITH ann.ppmp_ngas
  19.      replace acc_no WITH ann.acc_no
  20.      replace amount WITH ann.amount
  21.      SELECT ann
  22.      skip
  23.   ENDDO
  24. ENDDO
  25.  
  26. thisform.grid1.Refresh