erratic cursor movement and character replacement in code window (1 Viewer)

AlanS

Registered User.
Local time
Today, 17:08
Joined
Mar 23, 2001
Messages
292
I'm encountering a weird phenomenom: when attempting to edit VBA in a particular modal form's code module, Access begins making changes to my code before I finish a line. Spaces are added or deleted, the cursor (insertion point) is moved, and capitalization is inserted or removed. This makes it very difficult to edit or insert lines of text.

For example, if I try to type msgbox strFoo, after four or five characters are typed, the "m" and "b" have already been capitalized. When I type the space at the end of the first word, Access immediately removes it and moves the cursor back one position. Such code "normalization" usually occurs only when you move off of the line.

I've seen this behavior before when working on a form with an OnTimer event procedure and the Timer interval set to some positive value, but that is NOT the case here. I've also exported the entire database to a new blank database, de-compiled and re-compiled it, repaired and compacted it, etc., but the problem remains.

The only way I've found to stop it is to first close another form (from which the problem form is opened via DoCmd.OpenForm activated by a command button. Still, it seems to me that there's something abnormal here. Anyone have any ideas?
 
R

Rich

Guest
Did you try inserting a break point when the problem starts. It found the cause of a similar problem I had.
 

AlanS

Registered User.
Local time
Today, 17:08
Joined
Mar 23, 2001
Messages
292
Rich, I'm not sure what you're suggesting. I could put a break point in the code, but the problem is not anything that happens when the code is running (which is when break points are operative). Rather, the problem is the behavior of the cursor while I'm editing the code.
 
R

Rich

Guest
When I had a similar problem whilst trying to type in a module, out of frustration I clicked on the insert breakpoint, which immediately highlighted the offending code, oddly enough that too was on another form. Might be worth a try
 

AlanS

Registered User.
Local time
Today, 17:08
Joined
Mar 23, 2001
Messages
292
Are you saying that one piece of offending code (possibly in another module) may be what's causing difficulty in editing another piece of code? If so, will editing the offending code so that it no longer raises an error solve the problems with editing the other code?
 
R

Rich

Guest
I'd say that given the senario about having to close the other form it's the best chance you have. I don't remember the specific fault I had but it related to an event on an open hidden form causing the problem.
HTH
 

Steve

New member
Local time
Today, 22:08
Joined
Oct 9, 1999
Messages
6
erractic code

Have exactley the problem you described with the erractic code. It has just started today. Did you find out what the problem was?
 

Steve

New member
Local time
Today, 22:08
Joined
Oct 9, 1999
Messages
6
erractic code

Did you find out what the problem was with the erractic code, the same thing has started with me today.
 

AlanS

Registered User.
Local time
Today, 17:08
Joined
Mar 23, 2001
Messages
292
I'm sorry to say I never did establish either the cause or the solution, although the problem has not recurred on any code I've worked on recently.
 

WayneRyan

AWF VIP
Local time
Today, 22:08
Joined
Nov 19, 2002
Messages
7,122
I don't know the cause for this either, but it does happen
every so often. It appears to be local to a form. I had this
happen over this weekend in an A2000 database.
Repairing the database didn't help; neither did importing
everything into a new empty db. Luckily I had just begun
working on this form and just deleted it and moved on.

Wayne
 

Steve

New member
Local time
Today, 22:08
Joined
Oct 9, 1999
Messages
6
Okay thanks anyway, looks like 2 days gone but at least I backed up.
 

Users who are viewing this thread

Top Bottom