473,402 Members | 2,055 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,402 software developers and data experts.

text function

ddtpmyra
333 100+
Im try to catch the part numbers on a specifict field inside access query and I dont know what kind of function to use.

example data:
new order #ABC-001

the result i wanted is to get all characters that starting with # and end on the 10th character after it for example.

please help.
Jul 1 '08 #1

✓ answered by missinglinq

Am I correct in understanding that you want to parse out the # sign plus the next 10 characters? If so, something like this should work:

Mid(TextField, Instr(TextField, "#"),11)

With "new order #ABC-00123456789X"

this will return

#ABC-001234


Linq ;0)>

4 1803
nico5038
3,080 Expert 2GB
For this the string functions can be used in a query.
Check the Instr() function in the help file. It will return the start position of a given character (or string).
When > 0 the sting is found at that position and a Mid() function can be used to extract the needed string.

Sample with the Left() function:
Expand|Select|Wrap|Line Numbers
  1. select left(fieldname,5) from tblX
  2.  
This will return from your string "new order #ABC-001"
"new o"

Let me know when you run into trouble :-)

Nic;o)
Jul 1 '08 #2
missinglinq
3,532 Expert 2GB
Am I correct in understanding that you want to parse out the # sign plus the next 10 characters? If so, something like this should work:

Mid(TextField, Instr(TextField, "#"),11)

With "new order #ABC-00123456789X"

this will return

#ABC-001234


Linq ;0)>
Jul 1 '08 #3
ddtpmyra
333 100+
The combination of MID and INSTR function works perfectly fine.

Thanks a ton!
Jul 3 '08 #4
missinglinq
3,532 Expert 2GB
Glad we could help!

Linq ;0)>
Jul 3 '08 #5

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

Similar topics

15
by: Henning Vestergaard Poulsen | last post by:
Hi, I have a problem that I hope someone can help me with. I'm building a web page with pictures I've taken with my digital camera. I have succeded making a javacript that, when clicking on a...
3
by: Mark | last post by:
Hi, Im trying to validate a form, all the validating works apart from one field. This particular field must consist of the first 2 characters as letters, & the following 5 as numbers. And if it...
4
by: frogman042 | last post by:
My daughter is playing around trying to learn JavaScript and she wrote a small program that prints out a message in increasing and decreasing font size and color changes. She is using document...
2
by: charlie_M | last post by:
I have the following code: <script type=text/javascript> function hide_tooltip(){ var hp = document.getElementById("tooltipper"); hp.style.left=0; hp.style.top=0; hp.style.width=1;...
5
by: simon_s_li | last post by:
Hi, I have 5 fields in line where I need to drag and drop the text from one field to another field and then all the fields need to re-order themselves. So for instance if I drag the text in...
3
by: excel_hari | last post by:
Hi, I couldnt locate a Classic ASP group hence posting here. One of my colleagues has designed an intranet site and one of the pages has a drop-down box with close to 300 options. I want to...
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.