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?
 
Back
Top