I am trying to increase a counter based on a record match. I first initialize the counter to 1. If there is a record match, I want to increase the counter by 1 else set the counter to 1.
For instance, if there are five records matches in a row, the counter would be equal to 5. Below is my code. Currently, the stage variable only increases to 2 and repeats 2 for every record match after that, so it is not increasing after 2. What is causing this?
Code: Select all
If svMatchCheck = 1 Then
(svGroupRecordIdx + 1)
Else
(svGroupRecordIdx = 1)
Code: Select all
If svMatchCheck = 1 Then
(svGroupRecordIdx = svGroupRecordIdx + 1)
Else
(svGroupRecordIdx = 1)
Thanks in advance.