Connecting Tech Pros Worldwide Forums | Help | Site Map

Select Query Help

fong.yang@martecgroup.com
Guest
 
Posts: n/a
#1: May 16 '06
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.


salad
Guest
 
Posts: n/a
#2: May 16 '06

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