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

Criteria Question 1

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
I am creating a query that will calculate the number of days "something" takes..

I have a field called doc#..the doc# could be 12345.

I also have duplicate records of that doc#...e.g.
12345-CONT-1...I want to exclude ALL the "CONT-*" from my query..how can i do this?

Thanks in advance DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 
heya,

assuming that the values of the field that you want returned are strictly numeric, you can use the IsNumeric function in your criteria. the syntax is IsNumeric([fieldName]). this should return only the records that contain ONLY numbers in their values... hope this helps

mirirom
 
sorry, NO..The field name does have a letter after the number...e.g
12345-1A...

DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 
you can also use the InStr function in the criteria.

to omit records
InStr([Field], "search string") = 0

to only include records
InStr([Field], "search string") > 0

in your case:
InStr([doc #], "CONT") = 0
this will exclude any record that contains CONT anywhere in the field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top