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

Update Current Row based on Previous Row

P: n/a
I have a small table that need to keep a balance of work outstanding. The
fields are as follows

REC_COUNT (auto-index created record counter)
DATE (work date)
QTY_REQD (work added on that date)
BAL (balance of work outstanding at the end of that date)

The field REC_COUNT is used as a sort order field so that there is no
confusion about which record is next.

I need to be able to read the BAL from the previous record and add to it the
the QTY_REQD. I have tried using a query (I am not a VB programmer) using
'Dlookup' where the REC_COUNT is the current REC_COUNT-1 but cannot get this
to work. I have tested the theory of the DLookup OK by returning the
REC_COUNT from the previous record. I assume this works as the REC_COUNT
already exists for all records. However, the BAL field is null until this
query runs.

Can anyone throw any light on how I can achieve this with a query?

Regards

Tom
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"AAVF" <tm*********@aavf.co.uk> wrote:

Please ignore the posting from the "starwars" persona. That person has some
problems.

Crossposting to several relevant newsgroups, such as you have, is perfectly fine.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.