CurrentReading to PreviousReading

  • Thread starter Thread starter Plancii
  • Start date Start date
P

Plancii

Guest
This is about monthly water billing assigned to me is school. Meter reading usually is done every first week of the month (e.g. July 1, Aug 1, Sept 1, etc.)

My problem is I dunno how to obtain the Consumption (=CurrentMonthReading - PreviousMonthReading) since I got only one field for Reading.

I dunno how to convert the current monthly reading as the previous reading (e.g. Aug1 Reading is current now but will become previous by Sept 1.)

My instructor said its very easy...BUt i dont get it. I must be a moron or something....Please, help me....

Please....thank you very much..
 
Last edited:
Plancii,

You have obviously got a database at your disposal.

If you look at the tables in the database, one will
contain the previous readings. You can use the
DMax function to get the most recent date, then you
can use the DLookUp function to retrieve its value.
You can do this from a form.


If you subtract that value from the current, you will
have the last month's usage.

Have fun researching.

Wayne
 
That's quite alien to me, Wayne....


Nways, ill just set back and try your hint....Thanks....:D
 
Plancii,

You can use the sample dbs that came with Access to learn
quite a bit. You can also download hundreds of dbs here
that deal with various topics. There are also the Help
files that will show you examples of various things.

You can also get a start on your db and post here with
a specific example of code that does not work.

Wayne
 
There's that Time and Billing thingy but it seemed not fit....

Yeah, i started DLing those...

BTW, my assignment is alright. I was able to make it via the Form and SQL/VB mod.

Thanks....
 
using the Dmax()

I could certainly use some samples of your Dmax, and Dlookup functions, if you could. I have a similar assignment, and I am having heck getting the thing to work. However, I have the previousReading, and the CurrentReading as two separate fields, and want to move the CurrentReading to the PreviousReading as I move through the DB for the next month of readings.

Thanks for any help,

Mac:)
 

Users who are viewing this thread

Back
Top Bottom