Solved Report Checkbox On Click Fires Twice

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. :p
 
Last edited:
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.
I have put a button on a report in the past, just to be able to print it easily, but that is it?
 
I have put a button on a report in the past, just to be able to print it easily, but that is it?
Yeah I was thinking back, I've maybe slapped a button on a report on rare occasions for some reason, but close to nothing.
 

Users who are viewing this thread

Back
Top Bottom