ram121


The query displays several records with several fields. How can I narrow the query down to pull a single record of multiple records in which the account number occurrs more than once. (It is the account number that I'm trying to get to pull just once for an entire record.) The catch is, there is one work order for in-State, and one work order for out-of-State. However the in-State one sometimes multiple entries due to multiple products that the multiple records account for.

Dave




Re: Narrowing a query

magicalclick


You can GROUP BY account number. This will give you one account number. You have to do like MAX(FeildA) to pull out FieldA, otherwise you can't pull out the Field.





Re: Narrowing a query

ram121

Thanks, where would that go though I kind of tried that earlier, but in the 'Group By' cell when I put MAX, it didn't work. What specific cell would it go into and what would be how it would look






Re: Narrowing a query

ram121

I tried sending that query back to a table, where I made account number a primary key. After doing this though I received the key violation error window. It did achieve what I wanted, however I wish there was a way to turn that error box off, since there are a few other queries that I run with this concept in a Macros and don't want to have several of these boxes to have to click on, in order to complete all the Macros that I run.

Anyone have further constructive and/or clever suggestions