By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,508 Members | 2,904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,508 IT Pros & Developers. It's quick & easy.

Combo-box problem

P: n/a
I'm having trouble with a combo-box drop down list.

I have created a combo box drop down list of my suppliers on a form. This
form uses just one table. The problem is that the drop down lists every
entry I've made in that field on the table. So I have the same suppliers
name repeated several times on the list. Obviously this is very clumsy. How
can I limit the list so that each suppliers name appears just once?

Thanks for the help.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Kevin Barnard" <ra*******@hotmail.com> wrote in
news:bi**********@ctb-nnrp2.saix.net:
I'm having trouble with a combo-box drop down list.

I have created a combo box drop down list of my suppliers on a
form. This form uses just one table. The problem is that the
drop down lists every entry I've made in that field on the
table. So I have the same suppliers name repeated several
times on the list. Obviously this is very clumsy. How can I
limit the list so that each suppliers name appears just once?

Thanks for the help.
You need another table. Call it suppliers. Put the supplier's name,
address, phone, salesman's name in it. Add another field called
SupplierID. Once that's done, add the supplierID to the table that
feeds your form. Remove all the supplier info in that table.

Change the ComboBox's rowsource property to the new table,
suppliers. Make the combobox two columns wide, [supplierID] and
[SupplierName]. You can make the supplierID column's width 0", so
that it doesn't show.

The combobox you have, if you built it with the wizard, should list
each supplier once, if the spelling (including case, leading and
trailing spaces is identical).

In my opinion you'll spend less time building the new table than
fixing the problems in the existing one. You'll also get a faster
acting listbox, and it'll be a lot easier to manage when you get
1000 different suppliers.

Bob




Nov 12 '05 #2

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Change the RowSource of the combo box to a query like this:

SELECT Supplier FROM tblSuppliers GROUP BY Supplier

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP0/pWoechKqOuFEgEQIHlACgg7g9Cyk+ZF2K4ysQCzB6HI8QuqYAn RSj
FbaXTsLdhQgdmcJN+/ZkasJk
=ET5q
-----END PGP SIGNATURE-----
Kevin Barnard wrote:

I'm having trouble with a combo-box drop down list.

I have created a combo box drop down list of my suppliers on a form. This
form uses just one table. The problem is that the drop down lists every
entry I've made in that field on the table. So I have the same suppliers
name repeated several times on the list. Obviously this is very clumsy. How
can I limit the list so that each suppliers name appears just once?

Thanks for the help.


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.