macro stopped working after crash

dedjloco

Registered User.
Local time
Today, 09:57
Joined
Mar 2, 2017
Messages
49
oke my Access crashed and now all the references in my macro's aren't recognized anymore. but they are still in my forms.
any idea's?
 
Too vague a question. At a minimum provide what the macros are supposed to do and what objects are involved: Forms, tables, queries...etc.

I see you posted "...they are still in my forms." But in what way? On what events are they being invoked?
 
I don't think that is relevant, because it doesn't matter which code there is. I just have a bunch of conditions referencing to checkboxes and they worked fine before the crash and now vba doesn't recognized all the references.
I hope this clearifies it a bit.
 
dedjloco - your original question and your response are too vague as problem statements. Access isn't so simple that from one isolated symptom we can make magical diagnoses. If you went to your doctor and you said, "I feel bad" but then gave no further description, do you think your doctor would give you some pills and tell you to go away? No, s/he would start asking questions relevant to the problem.

So when you say "I don't think that is relevant" you are second-guessing the doctors who ask the questions about WHY you feel bad.

Now... you say Access crashed.

What error message was associated with the crash?

How do you know that it was Access that crashed? (Because we are in the dark as to what these macros do, including possibly launching another application behind the scenes.)

How are the macros normally triggered? I.e. do you have a command button to launch them or do you have them linked as event responses to some of your controls? Do you manually launch them by name from the navigation panel?

Have you done a Compact & Repair of the database file since the crash?

When you now try to run the application you built, you say it fails. Is there an error message associated with the failure? Does any other part of the app still work?

If you want answers, give us something to go on. Don't just say "It doesn't work any more after a crash" and leave it at that. We're good but we ain't miracle workers. Last time I tried walking on water I got wet. I'm pretty sure my colleagues don't do much better in that regard.
 
I understand that you think I'm to vague but I think I told you exactly what my problem is, but I I'm going to try to explain it further.

Firts I think you think access crashed because of my program but my program was working fine. It was just access it self that crashed without warning. Just the standard message from windows that comes with every program that crashes.

Second the macros that are in the program are simple. I have a macro that change the visibility of other checkboxes, when it is checked. And then I call this macro a few times in different click macros of different checkboxes.
All these checkboxes have names. And that is where my problem is now. The names in the form are the same as in the vba code butt still it gives an error saying "compile error method or data member not found". Which means it can't find the reference.

I hope you can do something with this information.
 
Oh and about the compact and repair. This is new for me and didn't show up when I was googling. So can you tell me more about that maybe it solves my problem
 
Regarding Compact & Repair: Without knowing the version of Access, this is trickier. If you have Ac2007 or later, you get to Compact & Repair from the Access Ribbon's "FILE" tab. On older versions, I'm not sure I remember where it is. Maybe under the File menu option. If your application won't open, it is possible to open "naked" Access and select the C&R option and THEN point it to a file to be compacted & repaired.

Firts I think you think access crashed because of my program but my program was working fine. It was just access it self that crashed without warning. Just the standard message from windows that comes with every program that crashes.

No, I DON'T think that. Without more information, I KNOW that I don't know that, but your responses are not helping.

I'll also comment that since about Ac2003, I haven't heard many complains about Access "just crashing" unless your hardware failed or you got virus-smacked.

I think your complaint about "not working any more" would be different if you got a virus or a hardware failure, so by process of elimination, YES your program was NOT working fine - probably because it ran into something unexpected. Not saying I know what got into it. That's why I was asking questions.

Stuff happens, true - but computers tend to be deterministic, so stuff happens for a reason, not the phase of the moon.

You answered WHAT the Macros do but I was asking about how they are launched. You can call them from code or you can put a macro name in a form event slot or you can launch them from the navigation pane by selecting via double-click or other actions from the keyboard.
 
Code not running is usually a trust / security issue.

Add the database path to trusted locations.

file / options / trust center / trusts center settings ... / add new location
 
Static brings up a good point. If you go into the Start >> "Windows Update" form, there is a way to check the Update History. See if there was a system patch about the time that this stopped working. If you have "automated patching" enabled, you might not have seen a specific patch.

Static, in the absence of a patch that reset some security setting to its default, the problem description isn't a trust issue as the OP claims that he made no changes from the day it was working to the next day when it stopped. That is not usually trust behavior.
 
Dedjloco,

A word of advice...free advice...much like all the help and advice on this forum. Key word is free.

When others take time to answer your questions, we are under no obligation to do so. We do it because what this forum offers is something we feel holds value.

Doc has tried to warn you at least twice that your responses are not appropriate if your intent is to find an answer to your questions. Others, like myself do not have the time or the inclination to play 20 questions.

If in the future you plan on getting the most from this forum, I suggest you change your tactics.

Free advice, take it for what it's worth...
 
oke here is the file minus the importend info just the basic program.

PS I appreciate the help. I hope when you see the file you understand what I was saying.
 

Attachments

You don't have a control with the name "Me.Other_Check" it is "Me.Other_ Check", (Me.Other_ space Check).
I VBA it is converted to "Me.Other__Check".
 
I see thank you but why does it give an error on RL_Check and not on Other_Check?

And it keeps giving an error "problem communicating with ole server or activex control". do you know where this is comming from.
 
I see thank you but why does it give an error on RL_Check and not on Other_Check?
Ahh - MS-Access isn't 100% perfect. I could ask you the same question, why didn't you check all the controls in the code line? :)
I do not get an error "problem communicating with ole server or activex control"!
Try a "Compact & Repair" or create a new database and import all into it.
 
Last edited:
...create a new database and import all into it...

This is a good idea that can be done in a minute or so, and may (or may not) work, but is worth trying. It's possible that the Form (hopefully) became corrupted when the crash took place. Of course, it's also possible that the entire database was corrupted, requiring the use of your backup version...you do have a backup...right?

Linq ;0)>
 
I solved the problem. I don't know why, but the slider I put in the form caused the problem. I changed it for a textfield now, because that was better for more then one reason.
 
A slider is not one of the "normal" controls. You get to it from an extended control group that resides in a separate .DLL file. It is possible that a Windows patch changed the way it worked.

One last question: Did the form work UNTIL you put in the slider? Or did it stop working on a day when you made no changes?

You see, I'm asking the question rhetorically, and I'm glad you found the cause - but you need to realize that this kind of question is one you should always ask yourself when trying to root out bugs.
 
The anwser is no. But I think it had something to do with one another, because I tried some things after the crash. and that probebly created the problem with the slider. So I think when I put another slider in my form now it will work again.
 
Unfortunately, sometimes "remove and replace/rebuild" is the correct answer. Corruption of a control is an (occasional) fact of life with Office. Note that I didn't limit that to Access.
 

Users who are viewing this thread

Back
Top Bottom