Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convertible User Defined Values:
Message
 
 
À
22/08/1998 04:09:46
Zaraq Bari
Bari Studios Limited
Lahore, Pakistan
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00129008
Message ID:
00129037
Vues:
26
>I have an electrical bill calculation form. In one field the consumed units are stored and then they are multiplied by 4 to give the amount due to the consumer. Now what if the rate of the electricity goes up and the unit is 5$. How will the user change the rate at his own discretion? Also if he changes the rate today from 4 to 5 , the previous records will also be modified at the new rate. How can the user change the value for today , without modifying the previous records?

I would have a Rate table that the user can edit to change the rate. You could have several rates. In US, electric utilities have a commercial and residential rate structure. You could also have rates by date range in the Rates table [sometimes rates are adjusted based on seasonal demands]. In the Billing table, I would add another field for the Amount Due total for that billing period. You should have one record per billing period for each customer. That way you do not overwrite historical billing records.

>Speaking of records , when I open the form the label1 shows the caption of the first record as I have set its caption property to this.value :
>
>commandbutton::click
>thisform.label1.caption=(thisform.film1.value)
>dodefault()
>
>But when I click the Next Command Button , the value of the film1 text box changes but the label caption still shows the first record. But when I click it again , the label caption changes to the 2nd
>Record value , but the record pointer has moved to the 3rd record. How can I simultaneously display the label caption with the film1 text box value?

I do not understand the code you posted above. What method is this code located in? If it is in the Next button's click method, I think you need:

DoDefault() && presumably to skip to the next record + refresh the form
ThisForm.Label1.Caption = ThisForm.Film1.Value
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform