Query looking up item numbers in a table running slooooooooow

R

ryan.fitzpatrick3

I have a query that lists the basics, item #, item name, vendor #,
vend name, etc. Instead of manually entering in 50 items I created a
table and put all the items into it. Also I added some key's for
filtering so my table would look like this

autonum item# class category group
1 100001 FLOUR RETAIL ORGANIC
2 100002 FLOUR RETAIL WHITE
3 100003 OIL RETAIL
CANOLA
4. 100004 OIL RETAIL CORN
5 100005 OIL ISB
CANOLA
....
40 100040 HONEY RETAIL CLOVER
etc

I have the item number, all class, subclass and subsubclass
essentially. Now in the query I have new table field item# linked to
the item# field in the database table that I'm pulling. After the
field item#, I have item name then I put class, category and group. So
in the criteria for Class I can type in "FLOUR" and it should pull all
the item numbers associated with FLOUR. This would pull 10001 and
10002. But this pulls extremely slow. But when I manually type the
numbers into the item number criteria, using like "100001" or "100002"
it pulls in .2 secs. Why is this?

ryan
 
D

David Glienna

Make (autonum item# class) *KEY fields, and then you can search
quicker. Note that you cannot have two keys, but with Autonum, you're
usually safe (unless you want to renumber) I'd move the number outside of
the key, but determine another way to get unique keys
 

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