Format query field as fraction

M

Matthew

I have a field in a query that I would like to display as a fraction. i.e.,
display .5 as 1/2.

Also, I would like to enclude this field in an expression in the query.

Matthew
 
M

Matthew

Cool.

Next question: how do I call a VBA function from a query to format the data?

Matthew
 
C

Cheryl Fischer

You would create a Calculated Field by inserting the following in the first
row of an empty query column in the query designer:

CalcField: MyFunction([MyField])

Of course, change the calculated field name, function name and field name to
correspond with your needs.
 
M

Matthew

That worked perfectly.

When I try to access the datasource through ODBC, I get this error:
Undefined function 'FractionIt' in expression.

Any ideas?

Matthew
 
M

Matthew

Sorry about the ambiguity.

I only have one database. It is the one with the fractional field.

I am accessing the database with ColdFusion through ODBC. In case you don't
know, ColdFusion is kind of like ASP.

Matthew
 
C

Cheryl Fischer

Since the function works just fine locally and across a LAN, you may need to
ask in one of the Macromedia or other forums dealing with Cold Fusion. But
do check back here later; it is possible that someone else responding in
this newsgroup will know the answer.
 
M

Matthew

OK. Thanks for sticking with me :)

I am happy with the progress that was made. I will check with the
ColdFusion folks.

Matthew
 
C

Cheryl Fischer

All of the products that this article refers to are versions of Microsoft
C++. You're not going to make me refer you to a C++ newsgroup, are you?
<smile>
 

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