I am working on a application and have had great difficulty with this calculation.
This has a choice of 2 seasons for rates
the first is standard. It is the second one I need a hint with.
when selected a clacualtion needs to take place.
if txtKilowatt = 0 then the cost equals a flat rate of 10.00 assigned to txtCost.text
basic flat rate of $10.00 regardless of usage (even 0 kilowatthours)
or if txtKilowatt<= 400 then rate = .08 per kilowatt
or if txtKilowatt>= 401 and less than 800 then rate = .06 per kilowatt
or if txtKilowatt>= 800 then rate = .04 per kilowatt
The values are calculated as follows eg.
txtKiloWatt.text = 850
8 cents per kilowatthour for the 1st 400 kilowatt-hours used
6 cents per kilowatthour for 401 to 800 (8 cents for the 1st 400)
and 4 cents per kilowatthour for 801 and above (plus the 8 and 6)
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…