Access 97 VBA removes all my spaces

  • Thread starter Thread starter Colander
  • Start date Start date
C

Colander

Dear group,

I have an Access database from an other company, and it
needs a little alteration, so far so good.

Now when I enter the VBA editor, and I try to type code,
like:
Dim a As String

Then when I type not fast enough (typing fast helps) it turns out like
DimaAsString

Off course I'm not happy with that :-(

Does anybody have any clue where the 'Let me easily type spaces'
options is?
or any suggestion what so ever, I re-installed Acces, Office, and more
like
that.

Thanks,
Bas
 
It sounds like the kind of thing that happens if you try to edit code while
a form is open in form view that has code in its Timer event procedure.

It is safer not to have any forms open except in design view while editing
code.
 
Thanks!

I can't find any open forms, so I clicked the reset button (Is that
stopping all timers?) and the problem still remains...

Albeit that when I click on the mbd file all kind of automatic stuff
happens (like logging in to an external database and setting menu
options), is the reset button sufficient to kill all this?

(Sorry for my not knowing, I'm a C++ programmer, and the company I work
for still thinks that if you can programme one thing you can programme
all :-( )
 
It is possible that a form could be open but hidden. Try entering the
following in the Immediate Window (if you don't see the Immediate Window,
you can get to it with the keyboard shortcut Ctrl+G).

? Forms.Count

Forms is a collection of open forms, so if no forms are open, this should
print 0 to the Immediate Window.

It is also possible, of course, that I could be wrong and it may not be a
Timer event causing the problem at all, though from the description that is
what it sounds like.

To by-pass startup code when opening the MDB, hold down a Shift key when
opening it. There are two places that start-up behaviour may be defined. If
there is a macro named AutoExec, Access will execute it automatically when
the MDB is opened. Alternatively a form (or, more rarely, a Data Access
Page) can be defined as the start-up object, and any code in, for example,
the Open or Load event procedures of that form will be executed when the MDB
is opened. To see if a start-up object has been defined, from the Tools menu
select Startup. There are several other options in that dialog box that you
might want to change during development work too, for example you might want
'Allow Full Menus' enabled during development.

It is possible to disable the Shift-bypass key option, so if the AutoExec
macro or startup form code still fires even when you hold down the Shift key
when opening the MDB, it is because the original developer disabled that
option.
 
Hi,

Thank you,

The ? Forms.Count says 2, so I think you might be right.

And after I tried the <shift> option you mentioned, I can code
again, in a normal fashion, a space stays in it's place!

Thans a lot,
Bas
 
You might still have hidden forms open - close your database and reopen it
holding the shift key. This will bypass any startup forms or settings and
allow you to directly access the module you want to edit the code for.
That's all I can suggest - If you're still having the same problem after that
maybe one of the MVP's has another suggestion.
 

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

Back
Top