Object / With Block variable not set

P

Phil

Hi,

I'm creating a db in access 2000. I have one table with two fields: Key,
Description. I used the wizard to create a form for data entry. The form
works great, but I wanted to add a Command button to close the form. When I
drag to command button onto the form in design view I get the following
mesage from the Command Button Wizard:

"Object variable or with block variable not set"

What does this mean? I've never seen this message before.

Thanks for your help.
 
P

Phil

Hi again,

More to the problem. I discovered that if I open a new form in design view
and try to add a command button before doing anything else I get the same
message. The command button wizard keeps repeating the same message no
matter what I try.

thanks again
 
S

SteveM

You are trying to use a variable that has not been declared.

Try compiling your code and you should be taken to the offending procedure.

If you can't work out the problem from there, post the code from your
procedure.

Steve
 
P

Phil

Hi Steve,

There is no code. I have a new form opened by clicking on the "create form
in design view." The first thing I tried to do is insert a command button
and I get the error message as soon as I drag the command button onto the
form.
 
S

SteveM

Have you tried compiling the project?

There must be code in a module somewhere that is causing this error...not
necessarily in your new form.

Steve
 
P

Phil

Hi Steve,

I don't know what is going on. What I have found out is that if I enter the
db by first starting Access and then selecting my db everything works fine.
If I open the db using a shortcut on my desktop which has a path to my db
(which is what I always have done in the past) I get the error message.

I have switched to Vista Home OS and so far I'm not to happy. I don't know
is this may be yet another Vista problem.
Thanks for you assistance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top