This code works erratically sometimes it works and other times it doesn't
This code works erratically sometimes it works and other times it doesn't.
Some idea
9 replies
-
The idea is this, but continues erratical
-
Can you be more descriptive by what you mean "erratically"?
Looking at the code it looks like it is doing what you are asking with the data provided.
-
said:
A small video to see the problem.I don't see a problem. The first time you click the button your are on a record with Cod hr = 600 with a final date of 12 Dec 2024. Then you open and close the DB and then click on a record with Cod hr = 17 that has a final date of 29 Nov 2023.
You have this on line 4 of your button:
The first time you click the button with:
Final Date = 12 Dec 2024
Evaluation Date = 2 Dec 2024
the datorder will find records in Dates with a yearmonth() that is equal to or greater than 2024/12. From the looks of it you only have 3 records that match.
The second time you click on the button with:
Final Date = 29 Nov 2023
Evaluation Date = 20 Nov 2023
the datorder will find records in Dates with a yearmonth() that is equal to or greater than 2023/11. It looks like you have records from 2023 and 2024 that match this and thus you get more data.
Content aside
- Status Answered
- 1 yr agoWed, March 27, 2024 at 5:03 PM UTCLast active
- 9Replies
- 55Views
-
2
Following