Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan!!
Message
De
03/06/1997 10:50:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Scan!!
Divers
Thread ID:
00034138
Message ID:
00034727
Vues:
35
>>>>>I am using scan command everytime the form load up, so it calculate every single record. (I want to make sure whatever client enter is being calculate)
>>>>>scan
>>>>> **calculation
>>>>>endscan
>>>>>
>>>>>I want to know is there any other faster command can get the job done faster. Now, everytime client load the form it take 1 minute or so to open up and that's with 16 meg of ram. I can't imagine if the client have less than 16meg of ram, it probably take a while to load.
>>>>
>>>>why do you want to SCAN at load up time?
>>>
>>>I scan the data so it make sure what ever client enter had correctly calculate. I did it at the destroy event also.
>>>Unless I could find a way to do the calculation once the user finish entering data in one textbox, but I look through all the event it doesn't allow you to do so. I could use the keypress event, so that the user have to press tab or whatever evertime they finish enter the data and do the calculation there.
>>
>>
>>Let's take a step back here and see if I understand what you're doing. Do I understand that the user is entering the result of a calculation? And that all the data to calculate the result is available to the program? If that's the case, why is the user entering the result? Just have the program calculate the total. You can have the program store the result in the table, then just add or subtract each time and keep the total update.
>>
>>Craig
>
>Hi, Craig
>The user are not entering the result, I have to calculate that throught my program. I trying to fimd out a faster way to do the calculation instead of scan every single record at the Activate Event



Keep the total in a field in a table. Whenever the user makes an entry, update the total. If this is a situation where the user could be making multiple entries that would change the total (say, a grid), you may want to keep a running total in a field and display it on the form. When the user is ready to save, save the runninging total to the table. I've done this before and it works great!

Craig
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform