Locking up when running a macro from a form?

mugsmugs

New member
Local time
Today, 06:20
Joined
Jul 22, 2010
Messages
3
Hi,

I'm running Access 2003 and I have a form with a combo box and a text box. I have a button on the form to run a macro, but when I press the button, the program locks up?

With the form open, I can double click the macro manually and everything works with no problem?

Any help would be greatly appreciated.

Thanks.
 
what happens if you put a stop in your VBA code when the button calls the macro?
 
I'll try, but I'm not a wiz on any of this, so tell me how to put in a stop?

What is strange is that the Macro actually runs and does what it is supposed to. I enabled warnings and found that I get a type mismatch error with only an ok button and no way to see where the problem is occurring?
 
If you go to your form in designview. Open the properties for your button, and then go to the Events tab, there should be an event for the "on click" property. It will either be an "event procedure" or the name of your macro. which is it?

What does your macro do?
 
It seems the issue was that I had the Echo off in my macro. Oddly, the macro would run perfectly, and even display my msgbox that it was complete, but the program appeared to lock up. What was actually happening was there was a message somewhere that was not visible waiting for an input, but I couldn't see it. At least that is what seems to be the case.

Changing the Echo option to on, seems to have fixed everything???

Not exactly sure why?
 
You might also want to check SetWarnings as well. Just a thought.
 

Users who are viewing this thread

Back
Top Bottom