Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA editor acts erratically

Status
Not open for further replies.

dickhob

Programmer
Jun 21, 2004
9
0
0
US
Help, I'm going nuts! About a week ago, my cursor in the VBA editor began to act erratically. When I type and press a space, the cursor backs up to the end of the last charater. When I key in a quote mark I get double quotes and the cursor positions before the quotes- this happens a lot when keying other character if I just pause for a second to find the right character key (I am not a speed typst).

I found an article kb 177889 on Microsoft and followed it's instructions, but it did no good. This happened once before and I found another article (which I can't find now) and ended up copying all of my code (over 75 pages) to a text file, deleting code from Access, and then re-inserting it. That fixed everything until last week.

Does anyone know the cause and a fix for this?
Thanks
Dick

 
I get cursor problems when I haven't saved in VBA editor or when there are too many objects open for design. I think this is a memory issue. So don't climb 50 feet up before placing a protection point, so to speak. Save often, keep only needed objects open.


Jeff Roberts
Insight Data Consulting
Access and SQL Server Development
 
I have that problem when a form is loaded that is using the Form_Timer() event. I have to make sure I don't have any timers running when I go to the code editor.

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
It's likely that the editor is autosyntaxing and adds the additional quotes in it's way to correct for what it thinks as errors. It is also denoted by the timer property which may be running on a form while you're working on the code as vslammer has mentioned.

I have the same problem ... but I like autosyntax on!


Program Error
Why is it, I still think in terms of spectrum BASIC!
 
Thanks for the suggestions guys, but I still have the problem. I can't believe this is something we have to simply put up with.

Anyone else have ideas or better yet a fix?
Thanks
 
We don't have to put up with it, it's been fixed in VB.Net...which doesn't support edit-and-run debugging! [lol]

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
.Net does no good if your clients use A2k. I seriously doubt they are going to swap out 3,000+ users because I have an editing problem.
 
Have you tried making sure that all unnecessary objects are closed and you've saved both form object (if working on a module behind form) and vba project?

I get a cursor that won't even space away from first code word when there's too much in the edit buffer (just like what you're describing).


Jeff Roberts
Insight Data Consulting
Access and SQL Server Development
 
I think it must be somehow assoicated with open objects. Last night I changed the font back to Courier (after changing it per the recommand of the KB article) AND made sure no unnecessary objects were opened. (I do a lot of testing when 3-4 forms are opened).

Today, everything is working fine again... but that will change. Sure do wish there was a more solid fix.
 
It's definately that you having a form timer running.

I have function i run that closes all forms. Save it in a module, and run it in the immideate window when you have this problem.

Public Function CloseAllForms()
Dim frm As Object
Dim objForm As Object

10 For Each frm In CurrentProject.AllForms
30 DoCmd.Close acForm, frm.name
50 Next
End Function

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top