Solved

Formatting a DBComboBox

Posted on 1997-06-04
2
274 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now