Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DBDataList Control

Posted on 1999-01-23
2
Medium Priority
?
230 Views
Last Modified: 2013-12-25
   I have an Access database that I have bound through an ADO control to a DataList box.  I'm trying to display two of the columns in this list box with a dash in between them.  The code to display just one of the columns is:
 
datalist1.listfield = "Country"
 
The "Country" is one of the column names in this table and when executed, it lists the elements of that column.  Do you have any suggestions as to how I can simply list the elements of two columns with a dash in between them?  
0
Comment
Question by:akedah
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 400 total points
ID: 1499391
Your ADO control have to return both fields you want alreaady concatenate toghether.

Select Field1 + ' - ' + Field2 AS FieldToDisplay
From TableX
0
 

Author Comment

by:akedah
ID: 1499392
It took me a while to figure out that I needed to code a SQL statement and since I didn't have a SQL book that dealt with VB, it took me a bit longer to get the correct syntax.  Thank you so very much for your help!!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses

972 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