I bit of advice please ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working in access 2003 and my situation is this.
I am using a select query to obtain a listing (based on a user entered date)
of all the parts inspected. The report returns the part number and the
specific inspection performed, either "fit" or "weld".
I am then taking these results and querying it against another table that
returns the part number as well the estimated time alloted to perform the
"fit" or "weld" function. All of that is working fine.
When I run a report I am getting both times, fit and weld for each part
number.
What I need is to only display one or the other value based on the specific
inspection.
Example:
Current
Part # status fit time weld time
ab1 fit 2 5
ab1 weld 2 5
ab2 fit 5 7

what I need
Part # status fit time weld time
ab1 fit 2
ab1 weld 5
ab2 fit 5

I am trying to do this in the report versus in the query, but I am not sure
if that is the best way to go about it, or if I should be trying to take care
of this in the underlying querys..
Also im not sure if I should be using an "iif" or if there is another way to
go about this.
Any suggestions are appreciated.
Thanx,
Klutzz
 
?You have a table that has one column (of estimated time) for each specific
inspection? If so, that will make your task harder than it needs to be, as
you will have to figure out which column relates to the inspection that was
performed. Embedding data in your column names makes both you and Access
work a whole lot harder than necessary.

Could you clarify what your underlying data structure looks like first? How
you query depends on how you've stored your data.
 
Sorry It appears I may have been misunderstood.
For each record set I have one col. with the status ("fit" or "weld") and
two cols. with estimated times ("fit time" and "weld time"). I only want to
see results in the "_ time" col. that corresponds to what is contained in the
status col.
 
Klutzz said:
Sorry It appears I may have been misunderstood.
For each record set I have one col. with the status ("fit" or "weld") and
two cols. with estimated times ("fit time" and "weld time"). I only want to
see results in the "_ time" col. that corresponds to what is contained in the
status col.

You only need one field for the time. What "kind" of time it is will be
determined by the entry in the status column.
 
Back
Top