urjudo
asked on
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
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
ASKER
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?
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.
ASKER
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!!!
SELECT * FROM yourTable
WHERE [Last Name] >= Forms!yourForm.txt_StartLe
ORDER BY [Last Name] ASC