• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 38
  • Last Modified:

Alphabet order in access query

Hi Experts,
I have a query question.  my query has a field "Last Name" and sort it by alphabet order from A to Z, how to I do if I just want to pull from L to Z?  I have a field which call Last Name A: Left([LASTNAME],1)

Thanks
0
urjudo
Asked:
urjudo
  • 3
  • 3
1 Solution
 
Dale FyeCommented:
Something like:

SELECT * FROM yourTable
WHERE [Last Name] >= Forms!yourForm.txt_StartLetter
ORDER BY [Last Name] ASC
0
 
urjudoAuthor Commented:
I just tried to run the query first without any forms, it's pull from tables.  no quite sure if I can use "Forms!yourForm"  what is the txt_startletter?
0
 
Dale FyeCommented:
That SQL assumes you have a form open, and have a textbox named "txt_StartLetter".  Then you would either use the AfterUpdate event associated with that textbox, or a button, to open your query.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
urjudoAuthor Commented:
I'm trying to create a report, I need to have a query first and I added >= "L" in the criteria of the query, it pull all the letter from L to Z, what about if I just want to pull from L to P?
0
 
Dale FyeCommented:
From L to P would look like:

WHERE [LastName] >= "L" AND [LastName] < "Q"
0
 
urjudoAuthor Commented:
Thanks!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now