Solved

Formatting a DBComboBox

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

747 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

10 Experts available now in Live!

Get 1:1 Help Now