By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,819 Members | 1,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,819 IT Pros & Developers. It's quick & easy.

Autopopulate Access Form Field From Previous Record Value

P: 5
I'm using MS Access 2010. I have a form which has following fields: TransactionDate, StartKm, EndKm, Oilchange, NextOilChange.
NextOilChange is a calculated field (EndKm-OilChange).
What I have been trying to do unsuccessfully is once I enter a number(Km)in Oilchange field it automatically appear in the nextday's record and so on. Giving a running total of km since last oil change, until its time for next oil change. After new oil change new km is manually entered again. Want the record to persist even when Access is shut down.Many many thanks in advance...help.
2 Weeks Ago #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,470
I think you first need to understand/appreciate that the data is stored, not in sequence, but in a table. Records can be shown in sequence when they have data within that can be used for sorting.

Your explanation doesn't mention this which leads me to believe your design doesn't really incorporate it. Certainly what you've explained is not adequate to take information out as, apparently, it's not in there to take out.

Details are critical. Different approaches can work in different circumstances and the approaches can be very different. Without a clearer explanation of what you're working with it's hard to know which suits better.

I suspect that you really need to calculate the total by scanning through the data and finding the maximum stored value. How would that be filtered though. Your explanation leaves that unexplained.
2 Weeks Ago #2

P: 5
Apologizes, I was trying to be concise... I do have a table named DailyKm and a form for entering the Data called DailyKm. Fields are as aforementioned initially. Hope that provides more clarity? Thanking you for your help...
2 Weeks Ago #3

NeoPa
Expert Mod 15k+
P: 31,470
Hi again.

Your question was clear and concise. What is missing is information that would be in there if the design were as it should be. I assume that it's missing not because you forgot to tell us, but because you didn't realise it was required in the first place for good design.

However, we still only know what you tell us so my post was trying to prompt you to think. I suggest you read it again and consider what information would be needed in order to give you meaningful results. I see nothing there to indicate which vehicle the data refers to, and nothing in your question that explains you use only one, or even that you walk a lot and drink oil when you're thirsty.

In short, what I said before, we need all relevant information. If we don't know about something then it's very hard for us to help you with it.
1 Week Ago #4

Post your reply

Sign in to post your reply or Sign up for a free account.