formatting combo boxes with multiple fields

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

I have a combo box which displays a 3 fields (part number and several
dimensions). I want the display to look like (1234, 12.34, 12.340), but
instead it shows up as (1234.00, 12.34, 12.34). In other words I have no
control over the format. I've tried changing the properties in the query
but that won't work. In fact when I leave the query and go back in, the
format changes I previously made disappears. Is this a bug in Access??? Is
there a way around this problem?

Thanks,
Fred
 
Fred,
Try "formatting on the fly".
In your query behind the combobox, the PartNo and Measure1 column would
look like this...
PtNo : Val(Format([PartNo],"#"))
and
Meas1 : Val(Format([Measure1], "#.00"))
and the same for the third field.

That should do it...
hth
Al Camp
 
Thanks Al, worked like a charm although I had to get rid of the Val to make
it work:

like this,
PtNo : Format ([PartNo]), "#0.000")

Fred


AlCamp said:
Fred,
Try "formatting on the fly".
In your query behind the combobox, the PartNo and Measure1 column would
look like this...
PtNo : Val(Format([PartNo],"#"))
and
Meas1 : Val(Format([Measure1], "#.00"))
and the same for the third field.

That should do it...
hth
Al Camp

Fred said:
I have a combo box which displays a 3 fields (part number and several
dimensions). I want the display to look like (1234, 12.34, 12.340), but
instead it shows up as (1234.00, 12.34, 12.34). In other words I have no
control over the format. I've tried changing the properties in the query
but that won't work. In fact when I leave the query and go back in, the
format changes I previously made disappears. Is this a bug in Access???
Is
there a way around this problem?

Thanks,
Fred
 
Back
Top