query question

R

ryan.fitzpatrick3

On a query field lets say for an item # field, in the criteria can I
put
like "123456" or "123457" etc for as many items as I want, either 1 or
100? What would be the best way to do this if I have a lot of item #'s
I want the query only to look at? Thanks in advance.

Ryan
 
K

KARL DEWEY

With a LOTS you should use a 'criteria table'. Add this table in your query
and use the field as criteria.

If you might use the same items many times but not all every time then add a
Yes/No as second field for 'this time' and select as needed. Then add the
field to the query with criteria of -1 (minus one) to use those selected.
 
R

ryan.fitzpatrick3

Oh yea gotcha. Basically I created a table and manually inputted all
of the items> This works good but when I run a data parameter for all
of 2007, between 1/1/2007 and 12/31/2007 i get an 3146 error, but when
I run it from between 1/1/2007 and 3/1/2007 it comes up fine. Do you
know why?
 
K

KARL DEWEY

I do not know that error code. Is the field for your date a DateTime datatype?
Post the SQL for your query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top