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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching records in Queries

Status
Not open for further replies.

marcfl

Technical User
Jan 16, 2008
56
0
0
GB
Sigh... ok probably another really easy question to answer thatll make me look stupid, oh well here goes.. :)

I have a query which searches through about 427895 records, there's a column called "Box Numbers" and when i enter:

Between "321" And "324"

In the criteria box the query search brings up what i'm looking for and also boxes 3210 to 3239. Given that the table stores what's in these boxes there are alot of records per box. There MUST be a way that I can get it to display ONLY everything between 321 and 324! but... HOW?! :( help me!

Cheers,

Marc.
 
Dont know why its doing it? but a way ropund it is. If its just the values above you could use the "OR" statement a couple of times.E.G. "321 or 322 or 323 or 324"

If you dont ask you wont get :)
Steve Poole
Technical Analyst
Cinram UK ltd
 
hmmm, is the number stored as text??

may be worth trying to set the properties within the query to say its a number, or even have cint() wrapped round the selection... ie. myID = cint(tblID)

may also make a different to have in the criteria

>= 321 and <= 234

infact just noticed you have quotes around your between, which means it is referencing a text field

not sure, the cint() thing may work, and take out the "'s from the criteria

cheers

daveJam

even my shrink says its all your f#@/ing fault
 
excellent that works but if i wanted to search for 50 boxes in one go or smt that method could be a bit tedious lol
 
*sigh* thanks davejam i didnt check that.... my boss actually made the db and i asked him if he had made the Data Type Number.. he said yes. Nevermind my bad i should have checked that lol
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top