PDA

View Full Version : [SOLVED] Strange Errors/Breaks



wnazzaro
07-08-2005, 02:13 PM
I have a somewhat complex Project that is generating some strange Errors/Breaks for me, and I'm hoping someone can help me figure out what is going wrong.

I've attached my file so anyone who is interested in helping can see what I see.

For starters, when I try to run ShowForm from the macro list, the code breaks. This doesn't happen if I use the Custom Button on my toolbar.

The actual problem I am having is that I get an error message and can't figure out how to get rid of it, however the program works just fine.

Starting from ShowForm, select a trial from the comboBox and hit OK. Now hit Add. Enter a name (4 characters or less) and a position (string). The rest of the fields are numbers (generally a decimal).

The code does everything I want it to, but I get this message and can't figure out why.
Run-time error '91':
Object variable or With block variable not set

:help :banghead:

P.S. I removed the manager finding part of the Procedure, since it uses the company Outlook address book.

wnazzaro
07-09-2005, 05:14 AM
So, the problem has to do with Unloading forms. I don't understand why it causes things to fail, but it does. If you remove all the Unload statements and add an End to the Add button code of frmAddRscs, the code works as expected.

Killian
07-09-2005, 05:20 AM
No attachment (don't forget to ZIP it first)

wnazzaro
07-09-2005, 06:11 AM
Yeah, I pulled it off. Once I was able to look at it with a clear head, I found the problem was with Unloading the forms.