Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


NEED HELP with order of lookup in SQL select statement

Posted on 2006-05-22
Medium Priority
Last Modified: 2012-06-27
NEED HELP with order of lookup in SQL select statement

strSQL4 = "SELECT * FROM imlsmst_sql WHERE orig_ord_no = '" & rs("ord_no") & "'"

I need it to search from the end of the table.... Problem is that there are using the orig_ord_no over, so when i bring it up is is bring up the old on.
Question by:kwitcom
LVL 12

Accepted Solution

_Maddog_ earned 2000 total points
ID: 16735164
Hi kwitcom,

Search from the end of the table?
Sounds like you need a column you can sort by...

do you have any auto-identifier/date column you can sort by?
if so, you can add this to the query:
ORDER BY <column_name> DESC

so the final result would be:
strSQL4 = "SELECT * FROM imlsmst_sql WHERE orig_ord_no = '" & rs("ord_no") & "' ORDER BY ColumnName DESC"

- Maddog

Author Comment

ID: 16735266
Thnx... Worked....

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question