0

I'm trying to setup a form in MS Access 2016 Pro Plus. Genuine copy in use on a govenment PC (in case that matters).

So I have two problems. The first and main one is that I can't manage to connect a button to an OnClick handler on one of the existing forms. It just stopped working.

I've created a new form and attached an event to a new button there and it's working there (it does detect the code connected).

I'm not sure what's wrong because when I click on the button in the faulty form and on the ... to edit the code it does bring me to the correct function (including moving the cursor). So it's not a Sub mispelling.

Anyone has any idea of why a form (only one in my project) would stopped triggering its handler/s?

Gustav
  • 53,498
  • 7
  • 29
  • 55
Gur Telem
  • 706
  • 1
  • 7
  • 14
  • Just start with a decompile (see [this answer](https://stackoverflow.com/a/49214407/7296893), or any of the other answers on that thread). That might already fix it. – Erik A Oct 16 '18 at 07:25
  • Go to the VBE (code editor) and select menu Debug, Compile. Also, make sure `Option Explicit` is present in the top of any code module you may have. – Gustav Oct 16 '18 at 07:25
  • Cut the problematic event function code, recreate the event code, past inside of it your original code, there you are :) – Siyon DP Oct 16 '18 at 09:34
  • I've created a new form and manually re created ALL the fields. It worked for a few days but now again the same problem. I removed all the code and left a simple msgbox. Still no luck. Weirdly. Only when I completely removed a handler there was no error (nothing of course happened but there was no error, even not a not found error). – Gur Telem Oct 21 '18 at 10:51

0 Answers0