473,378 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

Jan 20 '06 #1
3 1241
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" <cw****@theatomicmoose.ca> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
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

Jan 20 '06 #2
Cool!

I'll give it a try.

Thanks a lot.

Jan 25 '06 #3
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!!!

Jan 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jonnytansey2 | last post by:
Can anyone out there give me a pointer regarding creating a dynamically-generated drop-down list connected to an array? And is that question as clear as chocolate spread? Here's what I've got....
4
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by...
2
by: ramesh | last post by:
hi, I am using Com+ in my application. It will have InsertRecords,selectRecords,updateRecords function. In the Web Form i have Drop-down list. I want to select records from SQL and add it to this...
0
by: Benny | last post by:
Hello Experts, Currently Im working on a web application using VS.NET with C#. There is a page that I need to disabled few drop down list controls. However, the "grey-out" color of the...
13
by: Leszek Taratuta | last post by:
Hello, I have several drop-down lists on my ASP.NET page. I need to keep data sources of these lists in Session State. What would be the most effective method to serialize this kind of data...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
4
by: Chris Kettenbach | last post by:
Good Morning, Quick question, I have an EditItemTemplate inside a datagrid. It should contain a drop down list of possible choices. I have an EditCommandColumn. The drop dow list column should...
2
by: Ren | last post by:
Hi all, I am a bit new to PHP and SQL so this may seem like a dumb question. I have already created a drop down list as part of a form which is automatically populated with values taken from a...
1
by: student2008 | last post by:
Sorry about the title its a tricky one. I have a form which allows me to add a question and answers into a mysql database via a combination of, if a certain option is chosen and the reset button...
3
by: jcassan | last post by:
Hello folks. I am new to these forums and have something, which has been stumping me for little while. I am using pspell to spellcheck a scrolling textbox (textarea) containing user input. I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.