473,387 Members | 1,549 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,387 software developers and data experts.

Sort Order in Access 2002

I have a query which filters records containing uppercase and
Lowercase i.e.

Smith and SMITH, Henderson and HENDERSON etc.

Is there a way that I can filter only those records that contain the
first uppercase letter and the remaining lowercase letters for my
query i.e. Smith , HENDERSON etc.

Thanks

Steve
Nov 12 '05 #1
3 1453
Asc(Mid$([SurName],1,1))=Asc(UCase(Mid$([SurName],1,1)))

You can use the Mid$ or Left$ function, but Mid allows you to chexk any
letter

Phil
"Steve" <mu******@hotmail.com> wrote in message
news:3e**************************@posting.google.c om...
I have a query which filters records containing uppercase and
Lowercase i.e.

Smith and SMITH, Henderson and HENDERSON etc.

Is there a way that I can filter only those records that contain the
first uppercase letter and the remaining lowercase letters for my
query i.e. Smith , HENDERSON etc.

Thanks

Steve

Nov 12 '05 #2
Thanks for your reply Phil.

I've tried running the query as an expression but it does not work.
How do I use it on the query grid or elsewhere in Access 2002.

Thanks

Steve
"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message news:<3f***********************@mercury.nildram.ne t>...
Asc(Mid$([SurName],1,1))=Asc(UCase(Mid$([SurName],1,1)))

You can use the Mid$ or Left$ function, but Mid allows you to chexk any
letter

Phil
"Steve" <mu******@hotmail.com> wrote in message
news:3e**************************@posting.google.c om...
I have a query which filters records containing uppercase and
Lowercase i.e.

Smith and SMITH, Henderson and HENDERSON etc.

Is there a way that I can filter only those records that contain the
first uppercase letter and the remaining lowercase letters for my
query i.e. Smith , HENDERSON etc.

Thanks

Steve

Nov 12 '05 #3
Sorry, not familiar with Access 2002. Only A2K & earlier. I assumed it was
the same.
I am assuming that you create a query based on your table (MyTable), and
still drag the Surname to the top line of the grid. Then the expression
would go in the Criteria of the SurName.

Insidently it will display Smith, SMITH and SmiTH, but not smith. ie it
checks only the first letter

If you can access (sorry for the pun) the SQL of the query you should have
something like

SELECT SurName FROM MyTable WHERE
Asc(Mid$([SurName],1,1))=Asc(UCase(Mid$([SurName],1,1)))

Phil

"Steve" <mu******@hotmail.com> wrote in message
news:3e**************************@posting.google.c om...
Thanks for your reply Phil.

I've tried running the query as an expression but it does not work.
How do I use it on the query grid or elsewhere in Access 2002.

Thanks

Steve
"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message

news:<3f***********************@mercury.nildram.ne t>...
Asc(Mid$([SurName],1,1))=Asc(UCase(Mid$([SurName],1,1)))

You can use the Mid$ or Left$ function, but Mid allows you to chexk any
letter

Phil
"Steve" <mu******@hotmail.com> wrote in message
news:3e**************************@posting.google.c om...
I have a query which filters records containing uppercase and
Lowercase i.e.

Smith and SMITH, Henderson and HENDERSON etc.

Is there a way that I can filter only those records that contain the
first uppercase letter and the remaining lowercase letters for my
query i.e. Smith , HENDERSON etc.

Thanks

Steve

Nov 12 '05 #4

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

Similar topics

4
by: Matt | last post by:
Hi all, We recently upsized two Microsoft Access Databases to SQL. We're using an ADP (2002) as the front end. All the conversion issues have been resolved, except for one: Whenever we...
0
by: importantEmail | last post by:
hi i have pasted page_load, my bindgrid, sort and itemdatabound event. my sorting in not working properly...i tried a couple of ways but there is something i am missing. pls suggest me on this...
0
by: samir dsf | last post by:
hi i have pasted page_load, my bindgrid, sort and itemdatabound event. my sorting in not working properly...i tried a couple of ways but there is something i am missing. pls suggest me on this...
3
by: brucedodds | last post by:
I have a client who has just migrated from Access 97 to Access XP. He uses make-table queries to sort tables by two fields (text & double) before exporting the records for another application. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
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
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...

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.