469,290 Members | 1,887 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

Getting the first letter of a field

How can I retrieve the first letter of data in a field within access?
(using access 2k?) is this a VB thing or is there an obvious solution?
Nov 12 '05 #1
4 11588
in a Query use this - Left([yourfieldname],1)

HTH
David B
George Thompson <do**********@hotmail.com> wrote in message
news:c5*************************@posting.google.co m...
How can I retrieve the first letter of data in a field within access?
(using access 2k?) is this a VB thing or is there an obvious solution?


Nov 12 '05 #2
George Thompson wrote:
How can I retrieve the first letter of data in a field within access?
(using access 2k?) is this a VB thing or is there an obvious solution?

FirstChar=Left(SomeField,1)

--
Ronald W. Roberts
Roberts Communication
rw*******************@robcom.com
To reply remove "_at_robcom_dot_com"

Nov 12 '05 #3
Another way, as the search criteria, is to let the query perform a paremeter
search...

[Question]*.*

Replace 'Question' with a user prompt, such as "Which letter do you want to
search for?".

The query then searches for this letter and appends it to the wildcard *.*.

E.g. Entering L in surname field will result in all surnames beginning in L
being listed.
"George Thompson" <do**********@hotmail.com> wrote in message
news:c5*************************@posting.google.co m...
How can I retrieve the first letter of data in a field within access?
(using access 2k?) is this a VB thing or is there an obvious solution?

Nov 12 '05 #4
George Thompson previously wrote:
How can I retrieve the first letter of data in a field within access?
(using access 2k?) is this a VB thing or is there an obvious solution?


Assuming you mean the leftmost character (whether a letter or a number)
then you can use a function
Left(myfieldname,1)

Peter Russell
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Ksenia Marasanova | last post: by
12 posts views Thread by Alan J. Flavell | last post: by
4 posts views Thread by George Thompson | last post: by
4 posts views Thread by darrel | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.