473,491 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Code needed to move backwards one space

I am writing some strings to MS Word. When I use the str function to
convert the street number to a text string, I believe it adds a space in
front for +/-. I don't want a space at the start of the line so is there a
way to get it to move back one space first?

If Not IsNull(rs!StreetNo) And Not IsNull(rs!ADDR1) And Not IsNull(rs!Unit)
Then
appword.Selection.TypeText Chr(13) + str(rs!StreetNo) + " " + rs!ADDR1 + ",
" + rs!Unit
Else
appword.Selection.TypeText Chr(13) + str(rs!StreetNo) + " " + rs!ADDR1
End If

--
Regards,
Peter
Nov 12 '05 #1
1 1881

"wolftor" <wo*****@rogers.com> wrote in message
news:B4********************@twister01.bloor.is.net .cable.rogers.com...
I am writing some strings to MS Word. When I use the str function to
convert the street number to a text string, I believe it adds a space in
front for +/-. I don't want a space at the start of the line so is there a way to get it to move back one space first?

If Not IsNull(rs!StreetNo) And Not IsNull(rs!ADDR1) And Not IsNull(rs!Unit) Then
appword.Selection.TypeText Chr(13) + str(rs!StreetNo) + " " + rs!ADDR1 + ", " + rs!Unit
Else
appword.Selection.TypeText Chr(13) + str(rs!StreetNo) + " " + rs!ADDR1
End If

--
Regards,
Peter


Peter, if you use Trim instead of Str you won't get the extra space.

Trim(rs!StreetNo)
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2326
by: lawrence | last post by:
Maybe its late and I'm tired but I don't understand what I'm seeing on the screen. I have this block of code: $choiceMade = $_GET; if ($simpleMode == "y" && $choiceMade == "") {...
6
6139
by: leegold2 | last post by:
I have been looking for a php word wrap function. I know there's an official PHP function but I've tried that and many of the functions contributed on that php.net page and none do what I...
699
33308
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
67
4188
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. ...
8
2722
by: AppleBag | last post by:
I just looked in the folder that contains my .NET framework installations, and I have versions 1.0,1.1 and 2.0. Do I need the 1 series since I have version 2.0? Seems like it might just be a...
17
2759
by: Mark | last post by:
I must create a routine that finds tokens in small, arbitrary VB code snippets. For example, it might have to find all occurrences of {Formula} I was thinking that using regular expressions...
1
3188
by: Eric | last post by:
When I run my script it gives error on the following line: strEmail = Right(strEmail, (Len(strEmail) - 1)) I enclose my code and the sample text file too Thanks,...
12
2384
by: syn1kk | last post by:
1: float (*data); 2: data = malloc(31 * sizeof(data)); 3: data = VARIABLE; Question 1: The variable data is a float pointer? Question 2: When the is used. Does that mean it is an...
232
13062
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
0
7112
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7146
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7356
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5448
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4878
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.