Preceding Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have this kind of table

Code Date Qty Value Amount
A N 1 5 5
A N+1 -2 Y
B N 2 3 6

The first Qty for a given code is always positive.
If Qty is negative I want Value (Y) to be Equal to the preceding value (5).
In other words if Qty is negative Value (Y) must be equal to the value of the
last positive Qty (5).
I have no idea to solve this problem, so I’m requesting for HELP.

I know no VBA. I build my queries in the QBE.
 
You need to determine what makes a record a "Preceeding" value. Is it a
number, the date, the time, or a combination of other things. Then, you
would need to query that preceeding number to get it.

Without VBA knowledge, it may be very difficult.
 
Thank you for your reply.
can you (anyone) recomend me a good book / Tutorial for VBA beginners?
 

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

Back
Top