Getting a value from the last record

J

jtfalk

Hello,

I have an inventory database. I have the sum of apples in my last record and
want to subtract apples today from it. The value is the last record number
from a table:

Total apples (in last record) = 25
(new record) sell 5 apples = total apples = 20

me.total_apples = me.sell_apples + (last record me.total_apples)

How can I get that last records me.total_apples.

I do not have an open internet access so I can not go see alan browns web
page only microsoft web pages.

Thanks
 
K

KARL DEWEY

How will Access know what the last records is? Do they contain a DateTime
tracking field or a number field that is incremented for each new record?

Instead of looking for your last record why not use a totals query to track
buys and sales? And every so often do an inventory to adjust for spoilage,
thief, or other losses by entering an 'actual in the bin count' with
transaction date. The current balance query would use the last inventory
value and all other transactions after that to produce current on-hand
qunaity.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top