Connecting Tech Pros Worldwide Help | Site Map

Select Query Help

  #1  
Old May 16th, 2006, 02:05 PM
fong.yang@martecgroup.com
Guest
 
Posts: n/a
I have a tbl with a dealernumber field and zipcode field. Each dealer
number can have multiple zipcodes attached to it. I do I select just
one instance of the dealer number and all of the zipcodes attached to
that dealer number as well as all the other fields. Thanks.

  #2  
Old May 16th, 2006, 05:05 PM
salad
Guest
 
Posts: n/a

re: Select Query Help


fong.yang@martecgroup.com wrote:
[color=blue]
> I have a tbl with a dealernumber field and zipcode field. Each dealer
> number can have multiple zipcodes attached to it. I do I select just
> one instance of the dealer number and all of the zipcodes attached to
> that dealer number as well as all the other fields. Thanks.
>[/color]
I have little idea how you are selecting the records. Let's say you are
using a combo. You could select the dealernames and present them in
sorted order. So you don't get duplicate names, the SQL should have the
word DISTINCT. From View/SQL your statement might be
Select distinct dealernumber from table order by dealernumber

Now when you click on that, you could set a filter to records in the
form with something like
Me.Filter = "dealernumber = " & Me.ComboBox
Me.FilterOn = True
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Select Query help Simon Gare answers 15 January 7th, 2007 01:55 PM
Inner Join sub select query help GrungyApe answers 1 October 14th, 2005 07:05 PM
SELECT query help - Zero padding Rowland answers 6 July 20th, 2005 05:43 AM
Select Query Help Got2Go answers 5 July 20th, 2005 01:20 AM
Select Query Help Got2Go answers 5 July 20th, 2005 01:19 AM