Link to home
Start Free TrialLog in
Avatar of Richard Teasdale
Richard TeasdaleFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ADDING VARIABLE NUMBER OF RECORDS VFP

Hi. I import the company bank statements into a nice vfp database so we can track who is paid and when. If pcelba and olaf have not helped me with that before, then I will eat my pyjamas. The problem here is with credit card payments. You will appreciate that a bank statement records ONE payment to the card provider but that figure could be made up of a DOZEN payments through the card. So I have to append  a dozen new records to the table, enter the individual figures, and delete the single total paid to the provider A bit of a chore entering 'append new record' a dozen or so times -and growing as does the company. I was thinking if it were possible to have say a text field on the form; into which I enter the number of transactions on the card, then the bank statement table would be increased by that number of records? I could then happily fill in the values, delete the total...job done! Is this something that can be achieved in vfp?
Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Richard Teasdale
Richard Teasdale
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Richard Teasdale

ASKER

Sorry, but I have actually sorted myself. Good old do..while!
Avatar of Pavel Celba
Fortunately, you've closed the question before I started to think about it. :-)

I hope you are displaying some running total/rest as users are entering the line values.
I become even slower.

Even though you possible did a DO WHILE .. ENDDO, you best would prepare all new records in a cursor and then append it via APPEND FROM DBF("cursorname").
Besides the loop to iterate a foreseeable count as N records is FOR I = 1 to N...ENDFOR

Bye, Olaf.