473,386 Members | 1,958 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,386 software developers and data experts.

Report the numeric position of the 1st character in a string

I have created strings that are 31 (?) long

" X X C O O O " First Character = 5 (or 4 + 1 - if I
have to add 1 that's fine)
"X XXX XXX XXX X XXX" First Character = 1 (or 0 + 1)
" O X X X " First Character =18 (or 17 + 1)

What function (easy no VB loops please) will give me a number to work with?

I've tried Mid() and Code() but I must be missing a step.

Thanks!

--
Timber, his arms open.
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200508/1
Nov 13 '05 #1
2 1314
So you want to know how many blanks are at the beginning?

Len(MyString) - Len(LTrim(MyString))

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"alice R via AccessMonster.com" <fo***@AccessMonster.com> wrote in message
news:52***********@AccessMonster.com...
I have created strings that are 31 (?) long

" X X C O O O " First Character = 5 (or 4 + 1 - if
I
have to add 1 that's fine)
"X XXX XXX XXX X XXX" First Character = 1 (or 0 + 1)
" O X X X " First Character =18 (or 17 + 1)

What function (easy no VB loops please) will give me a number to work
with?

I've tried Mid() and Code() but I must be missing a step.

Thanks!

--
Timber, his arms open.
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200508/1

Nov 13 '05 #2
Douglas J. Steele wrote:
So you want to know how many blanks are at the beginning?

Len(MyString) - Len(LTrim(MyString))

OH! Of course!!! Brilliant!!

Thank you!

--
Timber, his arms open.
Message posted via http://www.accessmonster.com
Nov 13 '05 #3

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

Similar topics

3
by: success_ny | last post by:
Does anyone have a code snippet to compare those values so I can sort the array of alpha-numeric values that include both characters and integers in it? I.e., if we have values like 4236 and...
0
by: Rahul Chatterjee | last post by:
Hello All I have designed a dotnet application using VB which basically takes a selection and passes value to a crystal report which in turn passes the value to a Stored procedure. After the...
1
by: David | last post by:
I have rows of 8 numerical values in a text file that I have to parse. Each value must occupy 10 spaces and can be either a decimal or an integer. // these are valid - each fit in a 10 character...
7
by: microsoft access | last post by:
Is there a way to skip the format selection when e-mailing reports? Maybe in the VB coding? I want them to always be sent in an HTML format. Any information is helpful. Thanks.
7
by: bcpkh | last post by:
Hello All I need to check a string to make sure it does not contain any non numeric characters, the problem that I face is that the string is fairly long, 2784601121574585949, strtol etc. can't...
1
by: Intrepid_Yellow | last post by:
Hi, I have the following code that runs my report generator. The user selects a table from a combo box, then whatever fields they want from a list box. (This part all works and the report runs...
13
by: nishit.gupta | last post by:
Is their any fuction available in C++ that can determine that a string contains a numeric value. The value cabn be in hex, int, float. i.e. "1256" , "123.566" , "0xffff" Thnx
8
by: .Net Sports | last post by:
I am checking for text input on a form validation in javascript that required at least one numeric character along with any number of alpha characters for a given input text box. The below is a var...
12
by: micarl | last post by:
How would i print a report based on criteria selected from several Combo Boxes as well as multiple Multi Select List Boxes, that are located on the same form? I can get one Multi List Box, just...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.