So, on Both 2019R3.2 and 2020R1 it seems that the BevelButton even if it has a Action Event Handler only, it is acting on multiple clicks as well.
As an example, I have a button doing something . In the Action event I just say as the first line of code Me.Enabled = False, then I do the processing and whatever I have in the code.
Now, if I press once all works smooth and without any issues. But even if the Button theoretically is disabled if instead of single click , I press multiple times, to replicate what the users are doing, it seems that the code is fired multiple times even with the button disabled and that leads to app crash because the code is not designed to run multiple times in that short amount of time. I did put in a If statement as well if the button.enabled is true then to run the code and still same issue.
The other problem is that this happens on some pc’s only with the same OS version, in my case Mojave. On my side I cannot replicate it , on another Mac I can replicate it .
apparently the only way to avoid this mess, is to put as the second line from Me.Enabled = False , to put a Messagebox to warn them not to click like idiots and once they press ok the job works smooth. but the main question is, why the button is still clickable if in theory was disabled in the first line. and it keeps on firing for a short period of time.
well , I got in touch with some users and I discovered that for some reasons they keep like pressing like idiots on those buttons even if the button does not do double, triple x clicks , but they keep on doing so, I assume that this is a mental problem due to other solutions that block or don’t work and they keep on doing that.
So the simple way I did was to put on the first line after disabling the button which by the way , it does not work. I put a modal dialog where I explain that 1 time is enough and they have to wait. and after 4 seconds that disappears and problem is gone. I guess I’ll try Norman’s button as well , maybe is better than the current one , and if I can have a project that could replicate the issue as well file a bug report.
I saw something similar with a PushButton 7 years ago… That button allows the user to add a Record into a SQLite DB. I added a Me.Disable (whatever syntax it was) as the last line to avoid adding duplicates and the trouble ended…
or depending on the point of view (their data base file or mine…)