Re: Count of code per order
- From: John <johnlaf@xxxxxxxxxxxxx>
- Date: Wed, 26 Mar 2008 23:05:41 -0500
Jerry:
Do you think this would work on multiple columns?
We use a database (Access 2003) to record failures at Incoming Inspection. There are 12 two-letter failure codes. We've set the database up such that up to five different types of failures can be entered for each record. The table has five columns for these codes (each is followed by a column that lists the number of failures for each type).
Somebody asked if I could query the database by month to see if a certain type of failure was increasing with time. I set up a select query starting with the "Between" function for a date range. After some work, I was finally able to get the query to show all records containing the desired failure type in any of the five columns. However, it now ignores the start and end dates in my "Between" function, and lists every record with that failure type regardless of date. Also, I want it to count the instances of the failure code in each column, but I can't get it to do so thusfar.
Would a crosstab query help me?
John
Danu wrote:
Thank you! I'll give it a try!.
"Jerry Whittle" wrote:
A Crosstab query will fit the bill. Assuming A03 go to Query in the database window. Go to New and select the Crosstab Query Wizard. It may take a few tries to get it right. Somewhat confusing at first.
--
Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
"Danu" wrote:
How can I count the number of times a particular two-character code appears in a work order.
I have a table of records and the work order number appears several times, each time associated with a two-character code. I need to know how many times each code appears in the work order. Will this require a subquery?
Example: Work order 1234 has codes FJ, MN, FJ, ER, FJ. I need the result to display
Work order FJ MN ER
1234 3 1 1
Thank you.
- Follow-Ups:
- Re: Count of code per order
- From: John Spencer
- Re: Count of code per order
- References:
- RE: Count of code per order
- From: Danu
- RE: Count of code per order
- Prev by Date: Re: Count of code per order
- Next by Date: Re: query result to zero when no data found
- Previous by thread: RE: Count of code per order
- Next by thread: Re: Count of code per order
- Index(es):
Relevant Pages
|