472,097 Members | 1,104 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,097 software developers and data experts.

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 12239
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

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.