mikejaytlabustro
Access Database 2007 PH
- Local time
- Tomorrow, 01:56
- Joined
- Feb 11, 2013
- Messages
- 93
Fields: Date PumpNo PreviousReading CurrentReading
Jul 1 101 0 100
Jul 2 101 100 200
Jul 3 101 200 300
PumpNo Afterupdate event:
PreviousReading=DLast("CurrentReading", "MyTable", "[PumpNo]=[PumpNo].Text")
Problem:
I have many PumpNo and sometimes changes in PumpNo inputs could not be avoided.
For example on Jul 3, i want to change PumpNo 101 to 102 then access will give me the last current reading of PumpNo 102. There was no problem regarding this action, but when i realized that it should be Pump 101 and change back the value to 101 again, access gives me 300 instead of 200.
I think there should be an additional vba code for this to refresh or update the DLast value of PumpNo.
Thank you in advance for your help.
Jul 1 101 0 100
Jul 2 101 100 200
Jul 3 101 200 300
PumpNo Afterupdate event:
PreviousReading=DLast("CurrentReading", "MyTable", "[PumpNo]=[PumpNo].Text")
Problem:
I have many PumpNo and sometimes changes in PumpNo inputs could not be avoided.
For example on Jul 3, i want to change PumpNo 101 to 102 then access will give me the last current reading of PumpNo 102. There was no problem regarding this action, but when i realized that it should be Pump 101 and change back the value to 101 again, access gives me 300 instead of 200.
I think there should be an additional vba code for this to refresh or update the DLast value of PumpNo.
Thank you in advance for your help.