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

Extract Letter From Field

Good day Access Gurus
Can you assist a newbie please?
I would like to extract the first letter of a field, then the second, then the third, etc. of that same field.
IE if the Field called [First Name] and my name is in that field = Roger

I need to Extract R
Then O
Then G

And not Rog
Thanking you in advance
Sincerely

Roger
Oct 28 '11 #1
2 1638
ADezii
8,834 Expert 8TB
Expand|Select|Wrap|Line Numbers
  1. Dim strName As String
  2. Dim intCtr As Integer
  3.  
  4. strName = "Roger"
  5.  
  6. For intCtr = 1 To Len(strName)
  7.   Debug.Print Mid$(strName, intCtr, 1)
  8. Next
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. R
  2. o
  3. g
  4. e
  5. r
Oct 28 '11 #2
NeoPa
32,556 Expert Mod 16PB
A more helpful answer depends on where you're doing this Roger, but at the most basic level you need to use the Mid() function (whose full details can be found using Context-Sensitive Help).

Basically though :
Expand|Select|Wrap|Line Numbers
  1. Mid(String, Start, Length)
PS. ADezii gives a good illustration of how it might be used in VBA. Such flexibility is not available when used in SQL.
Oct 28 '11 #3

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

Similar topics

7
by: Greg Brunet | last post by:
I'm writing some routines for handling dBASE files. I've got a table (DBF file) object & field object already defined, and after opening the file, I can get the field info like this: >>>...
9
by: jason | last post by:
Access 2000 I need some help interogatting a table and extracting via ASP the final field in a row which has a value. In other words, I have a maximum of 10 fields but, at the user level he may...
2
by: Bob | last post by:
How do I extract the value of a table field and save it to a variable of similar data type in VBA ? Thank you in advance, Bob.
3
by: WJ | last post by:
..Net Experts, I have this concept described below: 1. I have a large (4K+) data record called Health_R. This record also contains Text/memo fields and Image. 2. The record layout is below:...
8
by: John | last post by:
Hi I need a auto-number field but with a letter prefix like "P1", "P2" etc. What is the way to achieve this? Is it possible to do this at table level? Thanks Regards
16
by: Schultzy | last post by:
I have two tables: The first table is called: Products it has the following fields ProdName ProdId ProdType ProdTaxes
7
by: Mag Gam | last post by:
I have a file similar to this: <Customer xmlns="http://www.localsite.com/ecommerce/2006-v01/ organization"> <ns1:Contract xmlns:ns1="http://www.localsite.com/ecommerce/2006-v01/ portfolio">...
2
by: beary | last post by:
I have a page with a form which has automatically generated fields, (which come from mysql column names). There could be any number of these fields, and I have no way of knowing exactly what they're...
1
by: sumathikcs | last post by:
I am using perl scripts to receive the documents. For this i need to verify the received time. So, i need to extract a field with date/time from oracle db. the data type of the field format is date....
4
by: Dr Al | last post by:
I have a project which requires the batch import of customer contact information, print mailing labels for those customers who have their date of first letter field in the database set to null, and...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
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
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,...

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.