Solved

Format ListBox columns

Posted on 2013-01-31
5
513 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
[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
  • 2
5 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
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 50

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 50

Expert Comment

by:Gustav Brock
ID: 38851125
You are welcome!

/gustav
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

728 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