Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limiting Queries With < and >

Status
Not open for further replies.

slavdaddy

Programmer
Sep 14, 2001
13
US
I have come across a DB where some genius decided to store numeric order number entries in a text field in an Access DB. I want to get all records with an order number higher than say 2500. just using >"002500" didn't work, and I was wondering if anyone could lend a hand. Thanks in advance!

-Corey
 
Hi Corey!

Actually, it is very common and even advisable to store numbers which will not be involved in calculations as text. Most people will format that the number so they can easily be sorted and searched on. As long as you are sure all of the entries are indeed numeric you can use the following criteria:

CLng([YourTable]![YourField]) > 2500

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top