Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 26th, 2007, 03:39 AM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combobox, with every expression just once

Hi all,

We are making a database, were we want to search in. So we made a combobox in wich you can choose a keyword where the database searches on. The combobox is based on a query which is indirectly linked to other data as for example names of people.

Now the problem is that the combobox shows the same keyword a couple of times. This because the keyword is linked to more than one person. For example if the keyword is linked to three people, it will appear in the combobox three times.
How can we make the combobox so that is shows every keyword just once? With a filter? Suggestions?

Tnx!

AB
 
Old June 26th, 2007, 07:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there... this should be solved in the query, in your SQL just add a distinct after the SELECT statement...

(Something like "SELECT DISTINCT fields FROM etc...)

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old June 27th, 2007, 12:32 AM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Simple, if you know it.

Thanks a lot!

AB





Similar Threads
Thread Thread Starter Forum Replies Last Post
combobox dhoward VB.NET 2002/2003 Basics 3 December 6th, 2007 03:29 PM
Message> in query expression <expression>. (Error ybg1 Access 5 July 15th, 2007 05:42 AM
Filling Combobox with value from other Combobox ayazhoda Access VBA 6 June 5th, 2007 04:58 AM
combobox calvados ADO.NET 1 February 8th, 2005 05:37 PM
combobox HenkRog VS.NET 2002/2003 2 March 17th, 2004 01:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.