Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DBDataList Control

Posted on 1999-01-23
2
Medium Priority
?
229 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
[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 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

715 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