Query Question (2 Viewers)

Saint34

Registered User.
Local time
Today, 18:27
Joined
Jun 23, 2010
Messages
16
I have a large database with a query that is called "WOQuery" in it has lots of information for a manufacturing plant. The columns of importance are: WorkOrderNum, QtyOrdered, QtyShipped

Pretty much all I want it to do is get a list of WorkOrderNum's that are NOT complete. A WorkOrderNum is complete when QtyOrdered = QtyShipped. One thing to keep in mind is that there are almost 37,000 WorkOrderNum's.

My idea was that I was going to go to 1st record, check if QTYOrdered = QtyShipped, if true then go to next record, if false place WorkOrderNum in a new query then go to next record. Till N records are complete. Where N = the number of total records.

I just don't know if that's the "proper" way of accomplishing this task and I wanted to see if anyone else had a more brainiack idea.

Thanks,
-Saint
 

boblarson

Smeghead
Local time
Today, 15:27
Joined
Jan 12, 2001
Messages
32,059
If you want a list of workorders not complete then just use WOQuery (if you want you can use it in a separate query so you have it as a base) and you can set the criteria on the QtyOrdered Field of

<> [QtyShipped]

and then it should return the ones you want.
 

Saint34

Registered User.
Local time
Today, 18:27
Joined
Jun 23, 2010
Messages
16
Cha-Ching.... Got it, plus I added a button to run the query and everything.. Works perfect I didn't do it the way I thought I was going to and it works MUCH faster then I thought it would.

My next question just so that I know in the future... When and how does a query update? Does it update the instant that it is opened?

Thanks!

-Saint
 

boblarson

Smeghead
Local time
Today, 15:27
Joined
Jan 12, 2001
Messages
32,059
My next question just so that I know in the future... When and how does a query update? Does it update the instant that it is opened?
Yes, a query always grabs the latest data from the tables when opened. It doesn't store the data anywhere it is just a view into the data.
 

Users who are viewing this thread

Top Bottom