Solved

Format ListBox columns

Posted on 2013-01-31
5
497 Views
Last Modified: 2013-02-04
How would I code in VBA from MS Access 2003 so that My values in Column(5) and Column(6) display as 0.00?

In my SQL I'm outputting this to the listbox
LB
This is my listbox as it displays right now
I want the 40.00 displayed etc...
cp2
0
Comment
Question by:lrbrister
  • 2
  • 2
5 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 38841648
what is the rowsource?
0
 

Author Comment

by:lrbrister
ID: 38841669
capricorn1
The recordsource is from a stored procedure
ADODB.recordset
0
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 38843203
The listbox always displays text.
You will have to adjust the stored procedure to produce the formatted output as strings as Format would do:

  Format(40, "0.00") => 40.00

/gustav
0
 

Author Closing Comment

by:lrbrister
ID: 38851024
Thanks
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 38851125
You are welcome!

/gustav
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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

863 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

23 Experts available now in Live!

Get 1:1 Help Now