Include Commas in Variant Data Type, How to do ???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access 2003 Application that uses some "Custom Functions". The
Data from these Functions is a Variant.

When I put this data into a Text Box in a Report, it does not show commas.
The numbers can be like: 200,000 ... 50,000 ... etc. The Readability is
better IF the Number could include a "Comma" with the display.

Does anyone know of a conversion routing that will accomplish this for me???

All help appreciated.
 
Any things can go into a variant. It sounds as if your dealing with a
FORMATING issue. Check out HELP on the FORMAT property for text boxes.
 
David:

First, I would like to thank you for your post.

I checked the Help - Format Text Boxes as suggested. They show different
things for Font ... Center ... Size ... Bold etc.

There is a DropDown Box for Format. I have "Standard" Typed in. There is
really nothing available for the Drop Down Portion that it appears to have
.... But not really.

I am stuck with Variant as a Data Type. I know it can hold numbers ...
Dates etc. Mine is Numbers.

Appreciate your help.
 
Try setting the FORMAT property to STANDARD. I didn't have time to look
at the specifics until now.
 
Your issue is most likely that you are returning a variant data type. Either
return a number or convert it to a value using:
=Val([YourFunctionReturnValue])
This allows "Standard" and "Decimal Places" to work as expected.
 
Duane:

This suggestion solved the problem.

I was looking for an "InLine Conversion" like this and I could not find it.
I was able to use this in the query feeding the Report. Everything then
worked as expect.

Appreciate your help.
--
Thanks,
Don



Duane Hookom said:
Your issue is most likely that you are returning a variant data type. Either
return a number or convert it to a value using:
=Val([YourFunctionReturnValue])
This allows "Standard" and "Decimal Places" to work as expected.

--
Duane Hookom
MS Access MVP


David C. Holley said:
Should have read the entire post, so the STANDARD property didn't work
then?
 
Back
Top