Formatting fields in a listbox

  • Thread starter Thread starter Jazz57
  • Start date Start date
J

Jazz57

Hello evryone

i have a listbox where i populate with some date.

Number
Name
Value

the Number field is a byte (only has 3 numbers)
the Name has 25 characters
the value is supposed to appear like that (52,07) but appears like that
(52,07658)
single, fixed , 2 decimals

With this thing, it happens that the information in the Listbox is very
confused to read.

i understand that the name , due to its lenght might damage everything.

Is there anything i can do about it???

Thanks for your help and support
 
You cannot format the listbox contents but there is no need to do this - just
format the datasource - in design mode of query that is the data source of
your listbox, click in the number field you wsant to format and then format
the field in the properties dialog......

Just checked this and it does not work - for some reason access seems to
forget the proprties set - very strange!

Alternative is to use the round function in the query - this works oK
 
hi there. thanks

i allready did that.

as you say, for some reason, access seems to forget the properties.

I had that problem too on a date field. I formatted as a Short Date and
Access stores it as a Long date. i really don't understand

Allthough , thanks a lot for your help. If you remember any other chance to
solve that problem i would appreciate very much your help.

One of the solutions is to change the field's order, and forget about the
decimals problem.

Can it be a double field instead a single field ???


--
Adriano Santos



"DomThePom" escreveu:
 
You can try using the Format function in the underlying source query.

Field: Format([YourDateField],"Short Date")

Be aware that if you use the format function in the underlying query it will
turn dates and numbers into strings and sort them as strings.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top