Solved

Formatting a DBComboBox

Posted on 1997-06-04
2
294 Views
Last Modified: 2006-11-17
I have a DBcombobox with a listfield generated from an sql query, the list has multiple fields.

How can I format the list so the fields line up.
When the user makes a selection I only want a subset of the fields  from the selection to be displayed in the text portion of the combobox

       
0
Comment
Question by:pchahal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
milton042297 earned 100 total points
ID: 1426854
You can use the simple vb combobox to make this task.
Take a look in this suppost code:
****************************************************************
set db = OpendataBase("MyDB",true,true)

set MySnap = DB.CreateSnapShot(Select * from myTable were MyField =" & "MyCriteria"

MySnap.Movefirst
while not MySnap.EOF
    myCombo.AddItem MySnap("MyField")
    MySnap.MoveNext

wend
*********************************************************************
I think that you can use this code to solve your problem.
0
 

Author Comment

by:pchahal
ID: 1426855
does this solve the formatting problem ? I need the  field columns in the list to line up as well as set the text portion to a particular field from the selection.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
message box in access 4 55
Excel VBA, find a string in a column, update a cell 7 116
VB 6 error 5 in windows 10 but not in XP 7 72
Collapse and expand table in Word 2010 2 157
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question