problem with count! (1 Viewer)

kita__n

Registered User.
Local time
Today, 11:20
Joined
Jun 12, 2002
Messages
24
problem with count! another prob!

I have a query which sorts all the "Work Order for today's date"

SELECT WorkOrder.[WorkOrder#], WorkOrder.Craft, WorkOrder.Description, WorkOrder.Zone, WorkOrder.Building, WorkOrder.[Room#], WorkOrder.TypeOfRequest, WorkOrder.Priority
FROM WorkOrder
WHERE (((WorkOrder.DateRecieved)=Date()));

How can I add a count function which will give me the total number of workorders when i run this query.
The work order number is a unique id no. that I enter....so i basically want it to be able to count the workorders for todays date!
For eg...if today work orders start from 102 and end at 128....I want it to tell me that No. of work orders in Todays date are 26.

Do i make sense.............I hope I phrased my problem right!
thankyou:confused:
 
Last edited:

fernin8r

Registered User.
Local time
Today, 17:20
Joined
May 28, 2002
Messages
142
I'm working with the same thing right now. I found a count function which works on it's own query, but i haven't been able to add it to the original query. Here's what i have

SELECT Count([Project_Number]) AS [Number] FROM Items WHERE (([Project_Number] =[Forms]![Homepage]![Project_Number]) AND (Check = True));

'Project_Number = Field
'Items = Table
This adds the records in my field that satisfy the where clause.

My problem in making the necessary changes to insert it into an already existing query. anyone know how to do this?
 

Shane_Mc

Refulgent Sesquipedalian
Local time
Today, 17:20
Joined
Jun 24, 2002
Messages
39
1) Create a Query to identify the amount of work orders for the day in question. If you will only ever want todays date enter =Date() in the criteria of the Date field. Other wise enter [Enter Date Here] in the criteria.

2) Create a second query based on the first one. In this query click the summation sign. The group by row will appear just above the criteria row. On the drop down list box in this row select "Count"

3) Run the second query. This will run the first one automatically to begin with.
 

Shane_Mc

Refulgent Sesquipedalian
Local time
Today, 17:20
Joined
Jun 24, 2002
Messages
39
Not sure did you change your original post Kita__N. But my suggestion should solve the problem even if it is a little long winded.
 

kita__n

Registered User.
Local time
Today, 11:20
Joined
Jun 12, 2002
Messages
24
WORKS

Thanks a bunch.....it works just the way I wanted it to !!

Great:)
 

kita__n

Registered User.
Local time
Today, 11:20
Joined
Jun 12, 2002
Messages
24
help help!

well....now it is giving me all 1's. It dosen't increment with every work order I enter!
what should I do?
 

fernin8r

Registered User.
Local time
Today, 17:20
Joined
May 28, 2002
Messages
142
Have you tried using DoCmd.Requery on the AfterUpdate property?
 

kita__n

Registered User.
Local time
Today, 11:20
Joined
Jun 12, 2002
Messages
24
hmmm....:(

would u tell me how to do that!! can't figure out how:confused:
 

Users who are viewing this thread

Top Bottom