Solved

Format ListBox columns

Posted on 2013-01-31
5
491 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

758 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

18 Experts available now in Live!

Get 1:1 Help Now