MWE
07-01-2006, 06:03 PM
The original title to this was Macros Not Available, but the word macro has a special meaning in Access, so I retitled it to be more accurate (?).
It seems like I am constantly asking questions like this about Access, ...
I have an Access2000 application that uses a single database file. There are several forms, each form has a half dozen or so VBA procedures tied to command buttons on that form. There are also 3 VBA modules with "general" code.
I recently changed a few lines of code in one sub in the code module associated with Form A. After the change, clicking on the relevant command button generated an error message indicating that the sub or function called was not defined. I thought perhaps I had inadvertenly changed the sub's name, but that was not true. So I tried other command buttons on the same form -- when any button on Form A was clicked, the error message appeared indicating that the sub or function called was not defined. :dunno The other Forms seem to work OK.
I checked several buttons to ensure that they were properly linked to the correct code. In particular, when in properties for a given commend button, clicking on the builder button for the OnClick property takes me to the correct procedure; so at least at that point, the linkage is correct.:banghead:
I exited (saving stuff as I did), restarted the appl -- same problems. I rebooted and restarted the appl -- same problems.
I had a very similar problem a few months ago. I got a bit of help here (more sympathy than actual help). Based on logic so silly I will not recount it, I tried logging onto the computer as various other people and played with the application. Suddenly the problem disappeared and did not reappear until today (even though I have worked with that code dozens of times since). Rather than relying on magic, I would like to understand what is really happening and why Access does not recognize the procedures in this one form. Is there some place one needs to tell Access that the code is "valid"?
Any help would be appreciated.
It seems like I am constantly asking questions like this about Access, ...
I have an Access2000 application that uses a single database file. There are several forms, each form has a half dozen or so VBA procedures tied to command buttons on that form. There are also 3 VBA modules with "general" code.
I recently changed a few lines of code in one sub in the code module associated with Form A. After the change, clicking on the relevant command button generated an error message indicating that the sub or function called was not defined. I thought perhaps I had inadvertenly changed the sub's name, but that was not true. So I tried other command buttons on the same form -- when any button on Form A was clicked, the error message appeared indicating that the sub or function called was not defined. :dunno The other Forms seem to work OK.
I checked several buttons to ensure that they were properly linked to the correct code. In particular, when in properties for a given commend button, clicking on the builder button for the OnClick property takes me to the correct procedure; so at least at that point, the linkage is correct.:banghead:
I exited (saving stuff as I did), restarted the appl -- same problems. I rebooted and restarted the appl -- same problems.
I had a very similar problem a few months ago. I got a bit of help here (more sympathy than actual help). Based on logic so silly I will not recount it, I tried logging onto the computer as various other people and played with the application. Suddenly the problem disappeared and did not reappear until today (even though I have worked with that code dozens of times since). Rather than relying on magic, I would like to understand what is really happening and why Access does not recognize the procedures in this one form. Is there some place one needs to tell Access that the code is "valid"?
Any help would be appreciated.