Re: One value from previous record

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If you're not capturing the DATE of the reading, I would *HIGHLY* recommend that you do as it will greatly help in writting the code. Additionally, if there can be only 1 reading per date, you can enforce this by setting the Indexed property of the field capturing the Date to YES(NO DUPLICATES). You will however have to go back and manually enter the dates for any records that already exist in the table.

Isla wrote:
TableName = RoundsTable

FieldNames = Fliter1InfTOTAL Filter1InfMGD Filter1EffTOTAL Filter1EffMGD
Record1 34708987 0 47907858 0
(Yesterdays Reading)(No Calc since (Yesterdays Reading)(No Calc ")
1st record)


Record2 47609876 .257 48906785 .678
(Todays reading (Calc field) (Todays reading) (Calc field)
was just typed in)


!Math is not correct just numbers to give an example

Now you take [Filter1InfTOTAL (Today) - Filter1InfTOTAL (Yesterday)] / 1,000,000
and that ='s Filter1InfMGD for TODAY (i.e. record 2)


I have to be able to do this for every MGD field... there is a Filter2 with the same calculations and other fields that have similar calculations. This is for a research facilty so i need something that with will not be deathly slow and will enter this data into the database. Did I explain this a little bit better? So Record3 will take it's data field - yesterdays / by 1,000,000 to create Record3 MGD field.


"David C. Holley" wrote:



Sounds like you need to create a custom function and use it as the DefaultValue.

Would you please post be the following information?

FieldNames, TableNames and relevant Form/Control names with description below them as in
[PriorDayReading]
Reading from the day before


Its a bit difficult to follow all of the information from the text.

Isla wrote:

This question was asked in the Access:Macros forum previously but feelings were hurt and the question was never fully answered the name of this post is "copy value from field to another in same table, different record"

Fields to be used: Filter One Influent Gallons, Filter One Influent MGD, same for Filter two, then Pump 1 Run Hours, Pump 1 hours by previous

Filter1InfGallons = an 8 digit number entered once everyday. What I need to do is take the filter influent gallons number from today (entered in the field for gallons) subtract that from yesterdays filter one gallons (previous record) and then divide by 1,000,000. I want it to populate the next field (Filter One Influent MGD) with that calculation. Record one Fliter One Influent MGD will be blank. I need this to happen in real time.. like after they tab out of Filter One Gallons. This MGD calculated number needs to be seen directly after that variable (filter 1 influent gallons) has been typed in. The purpose of seeing this value, is that if it is off from what it SHOULD be it will prompt them to re-check their log or re-check the filter. The purpose of storing this information on the table is that if it IS off and the readings are correct, they have that calculated amount already stored.

Same type of scenerio for Pump 1 run hours... the formula would be Todays run hours minus only yesterdays days run hours then divide that number by 24.

According to the other post it CAN be done and automated... but that it can be tricky. Please advise!!!!!!

.



Relevant Pages

  • Re: One value from previous record
    ... Filter One Influent Gallons, Filter One Influent MGD, same for Filter two, then Pump 1 Run Hours, Pump 1 hours by previous ... What I need to do is take the filter influent gallons number from today subtract that from yesterdays filter one gallons and then divide by 1,000,000. ... I want it to populate the next field (Filter One Influent MGD) with that calculation. ...
    (microsoft.public.access.modulesdaovba)
  • One value from previous record
    ... Filter One Influent Gallons, Filter One Influent MGD, ... with that calculation. ...
    (microsoft.public.access.modulesdaovba)
  • Re: One value from previous record
    ... the same calculations and other fields that have similar calculations. ... Filter One Influent Gallons, Filter One Influent MGD, ... >> (Filter One Influent MGD) with that calculation. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Effective kill list for this group?
    ... My posting of a kill list wasn't ... After reading my response I realise it was a bit reactionary, ... worthless rehashing of past flame wars. ... Thunderbird needs to be able to filter by ...
    (rec.audio.tubes)
  • Re: Algae problem
    ... Yeah it got cloudy after the lights were off for awhile and it cleared up ... My filter by the way is an Eheim 2028. ... I did refill the cannister with aquarium water and I ... Elaine or yourself are most helpful and from reading the newsgroups ...
    (rec.aquaria.freshwater.plants)