List box number format

wjyoung

Registered User.
Local time
Today, 07:11
Joined
Jan 21, 2011
Messages
13
Hello,

I have a multi-column listbox that is bound to some fields in a table. One of the fields is a number with 4 decimal places yet it displays with only 2 decimal places in the listbox.

I tried adjusting the rowsource for the list box as follows:
Format(myNumberField,"0.0000")
This would be fine except I am trying to save my file as a *.mde executable. When I open the *.mde file in MS Access Runtime 2010, I get an error with that format expression. It seems that in general you can't have expressions for a rowsource when using Runtime. Here's the error message:
Function is not available in expressions in query expression 'Format(myNumberField, "0.0000"'
(NOTE: I thought it strange that the closing parenthesis for the Format function was missing in the error message, though it is present in the Rowsource statement.)

Is there another way to adjust the format of a particular column in a list box? Can I set the format of a particular listbox column with VBA?
 
Have you tried running this in a query outside of the listbox?
 
Have you tried running this in a query outside of the listbox?

I had a similar error with a query that had an expression for one of the fields. It seems Runtime just doesn't allow expressions in SQL statements.
 
I found this:

support.microsoft.com/default.aspx?scid=kb;en-us;194374

It's saying a reference library might be missing. However, I don't see how I can update my reference libraries when I don't have a full version of Access. Runtime doesn't let you edit VBA where references are set.
 

Users who are viewing this thread

Back
Top Bottom