formatting combo boxes with multiple fields

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
 
A

AlCamp

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
 
F

Fred

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top