Linking

feebert

Registered User.
Local time
Today, 12:43
Joined
Jan 7, 2003
Messages
24
I have a table callled orders. And I need to find out how much labor was assigned to that order. So I have a query that the labor table to find all the labour transactions to that specific order.

Now what happens is that if nobody clocked into this job I will have no results, but I need a result of at least Zero!

Can anyone help?

Thanks in advance
 
In a control? Where do you need a zero? A report a form a what?

=IIF(IsNull(RecordSet), 0, RecordSet.Count)

Jon
 
Let me expand a little!

Let's say i have order 123, and that order had 3 operations associated to it like cutting, packing, and shipping.

My query result looks like this
order, operation, time, then labour rate

123 Cut 1.0 10.00
123 packing 0.5 10.00
123 shipping 0.25 10.00

What I need to show is something like this

123 "Blank" 0.00 0.000


Now this is a result od one order, this query can have many order associated to it.

Basically, if an order has no labour associated to it, how do as being Zero in the result of a query.

Thanks for the advise Jon, I hope this gives you a little more detail on what I'm trying to accomplish
 
Ok,

Is there a record still associated with it in the db? Meaning you had mentioned
cut, printing, etc. im assuming these are all fields in a database of the type
of activity or workload...but what if there is no activity for that certain day...
is this field empty but is there still a record? If there is no record at all how do
you expect to query this out? If there is a record but the activity field is null it
becomes fairly simple...you create another user defined field in your query

YourField: IIF(IsNull([ActivityField]), "Blank", [ActivityField])

That way your query will do the following:

if there is an activity the IIF evals to false and takes the second parameter
namely [ActivityField]. If its true it takes the first parameter or argument
"Blank". Then when you create a report you bound the report to this query and
you will see all of your activities including those that are "Blank".

:)

Pray for peace,

Jon
 
Thanks Jon

You're right , I guess there is no way of quering the table if no records exist ( cutting)

I will have to take car of it at the report or form level!

Thanks a million
 

Users who are viewing this thread

Back
Top Bottom