473,625 Members | 2,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 12515
in a Query use this - Left([yourfieldname],1)

HTH
David B
George Thompson <do**********@h otmail.com> wrote in message
news:c5******** *************** **@posting.goog le.com...
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.c om
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**********@h otmail.com> wrote in message
news:c5******** *************** **@posting.goog le.com...
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(myfieldnam e,1)

Peter Russell
Nov 12 '05 #5

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

Similar topics

9
3693
by: Ksenia Marasanova | last post by:
Hi, I have a little problem with encoding. Was hoping maybe anyone can help me to solve it. There is some amount of data in a database (PG) that must be inserted into Excel sheet and emailed. Nothing special, everything works. Except that non-ascii characters are not displayed properly. The data is stored as XML into a text field. When I use pgsql it's displayed good in the terminal. Now I run my script and print data
12
6016
by: Alan J. Flavell | last post by:
OK, today's email brought a comment from a reader, pointing out something that I'd long since noticed myself but hadn't done anything about it. On my pages, I've got a first-letter style on paragraphs. So far, so good: some of the paragraphs begin with a link, and there are styles in the stylesheet for link, hover etc. The first letter is still displayed as styled for the paragraph's first-letter.
3
3319
by: pilar | last post by:
Hi All, How can I validate the entry in a text field depending on the first letter of the string. I need to have a text box to acept 14 characters if the first letter entered is M and 17 characters if the first letter of the entry is A. I have been trying to do it for days. I also tried to look for any other similar issues in the newsgroup, access help, microsoft knowledge base...could not find any help. I'll appreciatte any...
4
464
by: George Thompson | last post by:
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?
4
5118
by: Dwight | last post by:
Hi all, How do you capitalize the first letter of each word in a field. I can format the field to UPPER case the last name of a person, but I can't UPPER case just the first letter of each name. tia Dwight
1
2666
by: Marc Verdonck | last post by:
First: I have some troubles in access, some fields needs to begin with a Capital letter. Example: louiselaan need to be Louiselaan. How can I become this? Second: I'm exporting my database to outlook. Than some names begin with a capital letter some don't. The name is always in capital letters in access and in outlook sometimes it's capital sometimes not.
1
2691
by: kkrizl | last post by:
I have a form that displays general information about an alarm permit location. There's a subform that shows detailed information about burglar alarms that have gone off at the location. When a new alarm is entered on the subform, I want to print a report that shows the general information and the alarms that were entered. The record source for the form is the Mailing List table (key is Alarm #). The record source for the subform is the...
4
2389
by: darrel | last post by:
I can grab a random number in vb.net like this: Dim RandomClass As New Random Dim RandomNumber As Integer RandomNumber = RandomClass.Next(1, 26) However, what I want is a random number. Short of making a case statement with 26 options, is there a more streamlined way to get an integer between 1-26 translated into one of the letters?
1
3035
by: Simon | last post by:
On my access forms when i enter text how do i automatical get it ti change the first letter of each word as a capital and the rest of the work in lower case. I want to do this as when i write in customer adress i want it to to change it automaticaly Hope someone can help
0
8251
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8182
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8688
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8352
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6115
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.