Isaac
Lifelong Learner
- Local time
- Today, 11:13
- Joined
- Mar 14, 2017
- Messages
- 10,107
I've never heard of anyone trying to draw pretty much any controls on a report, much less a checkbox, but thanks - I learned today that a checkbox on a report has no AfterUpdate event.
You may have to declare a global variable and keep track of when it's fired the first time to disable the second one, may have to get a bit creative on this one.
alone inside modGlobals, maybe with other globals:
global lngCheckboxEvent as long
report open - set to 0
checkbox click event -
if lngCheckboxEvent=2 then
lngCheckboxEvent = 3
'do something
else
'do nothing, except:
lngCheckboxEvent = lngCheckEvent + 1
end if
Admittedly, I'm not proud of the code I just wrote. And I'm not sure I thought it through 100% well enough to be fool proof.
But it may give you some helpful ideas you can build on.
Somehow, someway, you get a counter going and increment it so that it only fires approximately once per click.
You may have to declare a global variable and keep track of when it's fired the first time to disable the second one, may have to get a bit creative on this one.
alone inside modGlobals, maybe with other globals:
global lngCheckboxEvent as long
report open - set to 0
checkbox click event -
if lngCheckboxEvent=2 then
lngCheckboxEvent = 3
'do something
else
'do nothing, except:
lngCheckboxEvent = lngCheckEvent + 1
end if
Admittedly, I'm not proud of the code I just wrote. And I'm not sure I thought it through 100% well enough to be fool proof.
But it may give you some helpful ideas you can build on.
Somehow, someway, you get a counter going and increment it so that it only fires approximately once per click.
Last edited: