Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2005

Tip: Looking for answers? Try searching our database.

Writing Code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
T Martin - 27 Jan 2005 22:01 GMT
I am fairly new at writing in VBA.  I've picked up a lot of the basics
(docmd.[cmd], recordsets, synchronizing forms, etc)  Anyways, sometimes when
I am adding or editing code on some forms or modules, the text I type
automactically turns red like there's an error in the code (and I haven't
even finished typing the command.  When I try to put a space in a line of
code (i.e. "docmd.openform "frmName") the space is taken away.  I end up
having to type an entire line of code bunched together and then go back and
put the spaces where they are suppose to go.

Does anyone know why this happens and how I can stop this from happening?

thanks in advance for all your help.

T Martin
Brendan Reynolds - 27 Jan 2005 22:15 GMT
Some weird things can happen in the code editor if you have a form open in
form view with code in its Timer event while you edit code. If you think
that might be the problem, try switching the form to design view before
beginning to edit code.

Signature

Brendan Reynolds (MVP)

>I am fairly new at writing in VBA.  I've picked up a lot of the basics
> (docmd.[cmd], recordsets, synchronizing forms, etc)  Anyways, sometimes
[quoted text clipped - 12 lines]
>
> T Martin
T Martin - 27 Jan 2005 22:33 GMT
I don't think I had any forms with timer open when editing code, but I
probably did have a form or two open in form mode when editing some code in
a different form.  Do you think this may have caused the problem?  Do I need
to make sure that every time I edit code, I don't have anything open in form
view?  I am going to try that and see if I have any more problems.

thanks for your advice.

T Martin

> Some weird things can happen in the code editor if you have a form open in
> form view with code in its Timer event while you edit code. If you think
[quoted text clipped - 17 lines]
> >
> > T Martin
Brendan Reynolds - 27 Jan 2005 22:45 GMT
I have heard some reports that not having forms open in form view while
editing code does help to avoid corruption, so it is probably a good idea.
However the particular problem that I thought you might be experiencing
does, as far as I am aware, depend on the form having code running in the
Timer event procedure. If you don't have any code in that procedure, I think
it must be a different problem, but I'm not sure what. Unless someone else
has another suggestion, all I can suggest is to post back if it happens
again, with any additional information that you think may be relevant at the
time.

Signature

Brendan Reynolds (MVP)

>I don't think I had any forms with timer open when editing code, but I
> probably did have a form or two open in form mode when editing some code
[quoted text clipped - 35 lines]
>> >
>> > T Martin
T Martin - 28 Jan 2005 13:53 GMT
Making sure nothing is open in form view seemed to work.  There may have
been a form that had a timer event on somewhere, but it was set at 0, but
I'm not sure that it was open.  Oh well, it's working.

> I have heard some reports that not having forms open in form view while
> editing code does help to avoid corruption, so it is probably a good idea.
[quoted text clipped - 45 lines]
> >> >
> >> > T Martin
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.