p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access VBA (http://p2p.wrox.com/forumdisplay.php?f=80)
-   -   want sample code (http://p2p.wrox.com/showthread.php?t=51211)

mohiddin52 December 6th, 2006 07:52 AM

want sample code
 
I write the small foxpro prg the same thing iwant in access how should writ the code in click event below my foxpro prg
close all
clear
set stat off
set talk off
set safe off
set cent on
set date brit
sele a
use intcal
store 0 to mob,madd,mrec,mcb
store date() to mdop
@ 10,10 say [Enter Amount of Advance : ] get madd pict '9,99,999'
@ 12,10 say [Enter Date of Payment : ] get mdop
read
mdor=mdop
@ 14,10 say [Enter Date of Recovery : ] get mdor
@ 16,10 say [Enter Rate of Recovery : ] get mrec pict '9,99,999'
read

do while mrec>0
   appe blank
   repl ob with mcb
   repl add with madd
   if mdor<=mdop
      if mcb+madd>mrec
         repl recovery with mrec
      else
         repl recovery with mcb
         mrec=0
      endif
   endif
   repl cb with ob+add-recovery
   repl date with mdop
   mcb=mcb+add-recovery
   mdop=gomo(mdop,1)
   madd=0
enddo
close all
clear
set stat on
set talk on
set safe on
retu

leehambly December 6th, 2006 07:56 AM

Mohiddin,

There may be a foxpro dev about here that can help... but you may have a wait.

If you can break this code down into what it is you want to perform/achieve, we might be able to help come up with code for it, but at the moment, to be fair, I cant tell your variables from your keywords.

mohiddin52 December 16th, 2006 04:54 AM


Thanks for your replay
My table name is IbbMstr there are Obal (Opening balance) ,Rdate (Recovery Date, Ramt (Recovery Amount), Cbal(Closing balance) fields for example below like
Obal Rdate Ramt Cbal
5000 01/01/2006 1000 0
Now My problems is in my form(frmIbb) when I go to click the button in IbbMstr table all field should automatically Update like below
Obal Rdate Ramt Cbal
5000 01/01/2006 1000 4000
4000 01/02/2006 1000 3000
3000 01/03/2006 1000 2000
2000 01/04/2006 1000 1000
1000 01/05/2006 1000 0
I don’t no how should the code please help me


Mohamed Mohiddin
Officer


All times are GMT -4. The time now is 08:42 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.