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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Commenting Multiple Lines in Access 1

Status
Not open for further replies.

iXPhound

Technical User
Feb 25, 2001
146
US
Hi all:

Anyone aware of how to comment out multiple lines in access?

TIA!
 
Not that I know of. I even looked at source code from The Access 97 Developer's Handbook and Litwin, Getz and Gilbert use a single quote on each line... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Terry,

In visual basic, you can highlight a block of code and push a comment button or use a shortcut key to comment each of those lines. It will put an individual quote on each line, but it gives you the ability to highlight and comment as opposed to manually typing in the single quote each time. Any ideas?

Thanks!
 
The VB editor in Access doesn't support the kind of "block comments" that many of us are used to:

/*
commented out code
commented out code
commented out code
commented out code
commented out code
*/

or thusly - because VB is still basically a physical LINE by LINE oriented interpreted language. Thus, you have to comment out EACH line individually. If the first character of any line is a single quote, the interpreter ignores the line. If it's not, it attempts to interpret the line, thus generating either a syntax error, or a working line...

Jim

How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
of course a sneaky devil could resort to the comment indicator for the first line and the continuation character for subsquent lines. it does make the editing of comment blocks easier for some (people).

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
There is a tool in VB editor that will allow you to do this. Click on View - toolbars - customize - commands - edit. Then scroll to Comment Block and Uncomment Block. You can move these to your toolbar by clicking and dragging. You can then highlight the blocks of code that you want to comment out and voila!

Hope this helps.

A
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top