SET DEFAULT TO \EFG
SET SAFETY OFF
SET TALK OFF
SET ECHO OFF
SET DELETED ON
USE pay IN 0
SCAN FOR ins_co_nam = "AMERICAN UNITED LIFE" AND group_code = 'A02'
REPLACE paiddate WITH THISFORM.TEXT1.VALUE,;
fromdate WITH THISFORM.TEXT2.VALUE,;
todate WITH THISFORM.TEXT3.VALUE,;
servfee WITH .69
REPLACE balance WITH amt_pre - servfee,;
duecompany WITH balance posted with "P"
REPLACE servfee WITH 0, percent WITH 0
ENDSCAN
SELECT * FROM test, pay WHERE test.ss_numb = pay.ssnumber AND pay.ins_co_nam;
= "AMERICAN UNITED LIFE" AND pay.group_code = "A02" and AMT_PRE > 1 INTO Cursor;
CuReport ORDER BY test.last_name
IF _TALLY > 0
*BROWSE
REPORT FORM payment3b PREVIEW
inResponse = MESSAGEBOX("Do you want to post this data For A01 AUL?",36,"E.F.G. POSTING OPTIONS!")
IF InResponse = 6
*LOCAL loProgBar
SELECT pay
*loProgBar=ProgBar()
SCAN FOR GROUP_CODE = "A02" .AND. INS_CO_NAM = "AMERICAN UNITED LIFE"
*loProgBar.npercent=RECNO()/RECCOUNT()*100
SCATTER MEMVAR MEMO
INSERT INTO hist FROM MEMVAR
ENDSCAN
ENDIF
ELSE
MESSAGEBOX("FOUND NO RECORDS THAT MATCH YOUR REQUEST")
ENDIF
>Help,
>I using command buttons on a form as a graphic menu. This menu calls other forms,
>that in turn have menus. I understand that VFP only allows 128 do commands at a time. The most I have at one time is four
>(4) forms open at one time. My problem is, that I don't belive I'm using a proper closeing method. I beleive that if I can close
>my forms propely, my proublems with Do Nesting Exceeded will be solved.
>Can anyone please check to see if my code is grammatically correct ?
>The code is started from a command button on the form.
>
>Please return via Email
>
>
>Thanks John
>
>
>SET DEFAULT TO \EFG
>SET PATH TO \EFG
>SET SAFETY OFF
>set talk off
>set echo off
>CLOSE ALL
>USE pay
>GO TOP
>replace all PAIDDATE WITH THISFORM.TEXT1.VALUE, FROMDATE WITH THISFORM.TEXT2.VALUE, ;
>TODATE WITH THISFORM.TEXT3.VALUE, servfee with .69, balance WITH amt_pre -servfee, ;
>duecompany with balance posted with "P" ;
>percent with 0 FOR INS_CO_NAM = "AMERICAN UNITED LIFE" AND PAY.GROUP_CODE = "A02"
>
>REPLACE ALL servfee with 0, percent with 0 for amt_pre = 0 AND INS_CO_NAM = "AMERICAN UNITED LIFE" AND
>PAY.GROUP_CODE = "A02"
>go top
>set deleted on
>SELECT *;
>FROM TEST, pay ;
>WHERE test.ss_numb = pay.ssnumber .AND. INS_CO_NAM = "AMERICAN UNITED LIFE" AND PAY.GROUP_CODE
>= "A02" and AMT_PRE > 1 ;
>INTO Cursor CuReport ;
>order by test.last_name
>IF _TALLY > 0
>BROWSE
>report form payment3b preview
>inResponse=MESSAGEBOX("Do you want to post this data For A01 AUL?",36,"E.F.G. POSTING OPTIONS!")
>IF InResponse = 6
>CLOSE ALL
>LOCAL loProgBar
>SET PATH TO \EFG
>SET STATUS OFF
>USE PAY IN 0
>
>SET FILTER TO GROUP_CODE = "A02" .AND. INS_CO_NAM = "AMERICAN UNITED LIFE"
>
>SELECT PAY
>loProgBar=ProgBar()
>SCAN
>loProgBar.npercent=RECNO()/RECCOUNT()*100
>SCATTER MEMVAR MEMO
>INSERT INTO HIST FROM MEMVAR
>ENDSCAN
>*** ENDIF
>SET FILTER TO
>CLOSE ALL
>RETURN
>
>ELSE
>*** (DO NOTHING)
>ENDIF
>
>*** RELEASE THISFORM
>** DO FORM AULA01A
>ELSE
> MESSAGEBOX("FOUND NO RECORDS THAT MATCH YOUR REQUEST")
>*** CLOSE ALL
>*** DO FORM AULA01A
>ENDIF
>*** RELEASE THISFORM
>*** close all
>RETURN
>***
>
>***
>
>***JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."