Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 20th, 2006, 06:05 PM
cwhite
Guest
 
Posts: n/a
Default Drop List Question

It has been a long time since I last used access so forgive me if this
question is bit pedestrian.

There is a table with a list of entries in the name field like this:

tom
tom
dick
harrry
tom
dick
dick

if I create an access form with a drop-list to display these names it
will show them exactly like this:

tom
tom
dick
harrry
tom
dick
dick


what I want it to do is display the list like this (alpanetized,
descending and filtering out multiple instances of the same name)

dick
harry
tom

Where can i find information on how to do this? Or does someone have a
quick explanation they can share with me? (I'm using access 2000)

Thanks

  #2  
Old January 20th, 2006, 06:25 PM
Allen Browne
Guest
 
Posts: n/a
Default Re: Drop List Question

Set the RowSource of your list box to:
SELECT DISTINCT [Field1] FROM [Table1] ORDER BY [Field1];
replacing Field1 and Table1 with the name of your field and table.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"cwhite" <cwhite@theatomicmoose.ca> wrote in message
news:1137779873.367898.76630@o13g2000cwo.googlegro ups.com...[color=blue]
> It has been a long time since I last used access so forgive me if this
> question is bit pedestrian.
>
> There is a table with a list of entries in the name field like this:
>
> tom
> tom
> dick
> harrry
> tom
> dick
> dick
>
> if I create an access form with a drop-list to display these names it
> will show them exactly like this:
>
> tom
> tom
> dick
> harrry
> tom
> dick
> dick
>
>
> what I want it to do is display the list like this (alpanetized,
> descending and filtering out multiple instances of the same name)
>
> dick
> harry
> tom
>
> Where can i find information on how to do this? Or does someone have a
> quick explanation they can share with me? (I'm using access 2000)
>
> Thanks
>[/color]


  #3  
Old January 25th, 2006, 02:25 PM
cwhite
Guest
 
Posts: n/a
Default Re: Drop List Question

Cool!

I'll give it a try.

Thanks a lot.

  #4  
Old January 25th, 2006, 02:35 PM
cwhite
Guest
 
Posts: n/a
Default Re: Drop List Question

Thanks a lot, it worked like a charm, it wasn't displaying the names in
the list, but after looking your instructions I realized if I wrote it
as:

SELECT DISTINCT [Table].[Field], [Table].[Field] FROM Table ORDER BY
[Field];

it would display the names.

Thanks again!!!

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles