SpyhunterUK
New member
- Local time
- Today, 05:11
- Joined
- Dec 10, 2024
- Messages
- 10
I have a form with sub form. The sub form shows data in Date Order and as entries are added I have a button that sorts this in date order as well.
I need to be able to grab the previous row (after sorting) to calculate a currency so example:
Row 1 - 2/1/24 - £2
Row 2 - 1/1/24 - £1
After Date Order sorted:
Row 1 - 1/1/24 - £1
Row 2 - 2/1/24 - £2
I need to be able to add the rows as they go so like this: (after date and row sort)
Row 1 - 1/1/24 - £1 £1
Row 2 - 2/1/24 - £2 £3
Whereas if not sorted it looks like this:
Row 1 - 2/1/24 - £2 £2
Row 2 - 1/1/24 - £1 £3
So the main point being they need to be in date order and the previous row field grabbed. Can anyone help?
I have a row sort order in the query but when I add or refresh/requery the sub form it keeps this row order and doesn't produce a new one?
Help!
I need to be able to grab the previous row (after sorting) to calculate a currency so example:
Row 1 - 2/1/24 - £2
Row 2 - 1/1/24 - £1
After Date Order sorted:
Row 1 - 1/1/24 - £1
Row 2 - 2/1/24 - £2
I need to be able to add the rows as they go so like this: (after date and row sort)
Row 1 - 1/1/24 - £1 £1
Row 2 - 2/1/24 - £2 £3
Whereas if not sorted it looks like this:
Row 1 - 2/1/24 - £2 £2
Row 2 - 1/1/24 - £1 £3
So the main point being they need to be in date order and the previous row field grabbed. Can anyone help?
I have a row sort order in the query but when I add or refresh/requery the sub form it keeps this row order and doesn't produce a new one?
Help!