Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > combo box question


Reply
 
Thread Tools Display Modes
  #1  
Old 12-23-2003, 01:32 PM
BoSelecta BoSelecta is offline
Freshman
 
Join Date: Sep 2003
Posts: 34
Default combo box question


I thought that someone had something on this same topic posted earlier but I haven't been able to find it. Basically what I have is a combo box that is populated by a database field. I want the user to be able to start typing and have the combo box scroll to the entry which I currently have working. However, if they type something that doesn't exist in the combo box I want it to send a message asking if they want to add a new record to the database. I've got a list box that does this but want to do this with the combo box. Does anyone have a link to an explanation on how to do this?
Thanks
Reply With Quote
  #2  
Old 12-23-2003, 02:13 PM
Optikal's Avatar
Optikal Optikal is offline
Codeaholic

Retired Leader
* Guru *
 
Join Date: Oct 2002
Location: Winnipeg, MB, Canada
Posts: 4,543
Default

You will have to write this functionality yourself, as far as I know its not provided with VB. Or to save you alot of trouble, you can buy a 3rd party combobox control with the features you desire.
__________________
There are 10 types of people in this world, those that understand binary, and those that don't.
Reply With Quote
  #3  
Old 12-23-2003, 02:26 PM
thingimijig thingimijig is offline
Senior Contributor

* Expert *
 
Join Date: Jul 2003
Posts: 1,300
Default

could you work this into your code?

Code:
Private Sub Text1_Change() Dim i As Integer Dim x As Integer For i = 0 To Combo1.ListCount - 1 If Left(Combo1.List(i), Len(Text1.Text)) <> Text1.Text Then x = x + 1 End If Next i If x = Combo1.ListCount Then MsgBox "Nothing matching" End If End Sub

thingimijig.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple combo box question armatage General 2 08-22-2003 10:48 AM
combo box question Trisha General 2 04-01-2003 02:05 AM
Question..If combo text = "whatever" Then.. robryall General 1 03-28-2003 02:52 PM
combo box question piggybank1974 Game Programming 2 06-23-2002 10:17 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->