473,322 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

wrap text in the vb editor?

AccessIdiot
493 256MB
This feels like a really dumb question.

I have a very long SQL delete statement in my code. I would like to make it readable but if I put a carriage return in there it screws up my code. It wants it all on one line. What kind of special character do I have to put in there to show it's continuous? I tried \n and /n but neither worked.

Thanks!
Apr 26 '07 #1
11 25583
MMcCarthy
14,534 Expert Mod 8TB
This feels like a really dumb question.

I have a very long SQL delete statement in my code. I would like to make it readable but if I put a carriage return in there it screws up my code. It wants it all on one line. What kind of special character do I have to put in there to show it's continuous? I tried \n and /n but neither worked.

Thanks!
When adding a SQL statement using code ....
Expand|Select|Wrap|Line Numbers
  1. Dim strSQL As String
  2.  
  3.    strSQL = "SELECT Field1, Field2, Field3 " & _
  4.       "FROM TableName " & _
  5.       "WHERE Field2 = Value;"
Get the idea?
Apr 26 '07 #2
Rabbit
12,516 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1. "SELECT * " & _
  2. "FROM tbl_Data " & _
  3. "WHERE Field Is Null"
Will give you
Expand|Select|Wrap|Line Numbers
  1. "SELECT * FROM tbl_Data WHERE Field Is Null"
Don't forget the spaces. The underscore tells it to continue at the next line.
Apr 26 '07 #3
Rabbit
12,516 Expert Mod 8TB
Ah well, Mary beat me to it. I got pulled away from my desk for a little bit.
Apr 26 '07 #4
AccessIdiot
493 256MB
Brilliant. Thanks to you both!
Apr 26 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
Ah well, Mary beat me to it. I got pulled away from my desk for a little bit.
You snooze you lose!
Apr 26 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
Brilliant. Thanks to you both!
You're welcome Melissa.
Apr 26 '07 #7
NeoPa
32,556 Expert Mod 16PB
I get in late to a lot of these things nowadays, but notice the '_' is a VBA continuation character rather than a SQL one.
SQL doesn't care about white space. It's either there or it's not.
VBA on the other hand is very line orientated.
The underscore ( _ ) makes the interpreter treat two successive lines as joined.
The colon ( : ) allows you to put multiple commands on a single line.
May 1 '07 #8
AccessIdiot
493 256MB
I did not realize that - thanks!
May 1 '07 #9
NeoPa
32,556 Expert Mod 16PB
No probs Melissa.

Hey - You're a Guru now :)
Lucky we don't give out air-miles - you'd be a globe-trotter by now :D
May 1 '07 #10
AccessIdiot
493 256MB
Wow, post enough stupid questions and get promoted! Wish that worked at my job . . . ;)
May 1 '07 #11
NeoPa
32,556 Expert Mod 16PB
A lot of questions, yes. I wouldn't describe them as stupid though. Many of them are actually quite challenging (Rarely the case when they're stupid).
May 1 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Shawn Melton | last post by:
I have tried disabling the automatic word wrap feature in the text editor by going to: Tools/Options/Text Editor/Basic/General and Tools/Options/Text Editor/HTML/XML/General
1
by: IkBenHet | last post by:
Hello, I found this script to create a simple rich text form (http://programmabilities.com/xml/index.php?id=17): <html> <head> <title>Rich Text Editor</title> </head> <body>
3
by: Fluffy Convict | last post by:
I am trying to write a script that changes a textarea wrap realtime, basically like you can switch to and from "wordwrap" in Microsofts Notepad. Because of a bug...
8
by: name | last post by:
Back again for more critique... <grin> ------------------------------------------------ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #define MAX 10000
3
by: ColinC | last post by:
Hi, as a newbie to Visual Studio C# Forms development, I'd like some advice on the following. I have a form with a tab control. I have some tab titles that are three words e.g "house &...
2
by: Rich | last post by:
I accidentally toggled some key combination in my code module which is causing the code to text wrap. I meant to toggle ctrl-F. Is there a way to untoggle the text wrapt (wrap text)? Thanks,...
3
by: Jason | last post by:
Anyone know how to make the text wrap in a text box of a DetailsView?
1
by: duzhidian | last post by:
Hello: I just want to use a two columns web. If I put sidebar on the right, it there is a list, it's fine. If it is a paragraph, the width will not work? Why? In the following example,...
15
by: removeps-groups | last post by:
How to wrap text in <ptag if the text has no spaces and is very long? Here is an example: ...
3
by: danesh1354 | last post by:
Hi All, First I need to construct a text editor by python programming and add this code to a biger code that has been written before, and i would like that by my code for this editor have a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.