Text Field data conversion to Percentage

Ginny2222

Ginny
Local time
Today, 02:19
Joined
Oct 27, 2007
Messages
108
Hi all,

I would very much appreciate help with this one. So thanks in advance if anyone can help.

I have a table which has a Text Field (it has to be, I'm afraid). The data is listed as follows:
5.6%
12.23%
2.45%
etc.
I need to use these values to multiply other figures in queries. I have tried FORMAT and various other ways in the query to convert the data, but to no avail. All I get as a result is an ERROR. Anyone got any ideas?
Ginny
 
Maybe this function will give you some ideas:
Code:
Public Function Junk99(strIn) As Double

Junk99 = CDbl(Left(Trim(strIn), Len(Trim(strIn)) - 1)) / 100

End Function
 
Looks good RG. I'll see if I can manage it. tks.
Ginny
 
Glad to help. Post back if this gets stubborn. I see you helping lots to others. That's *great*!
 
It works as an expression directly in the query. I didn't have to build the function. That's great - THANKS RG.
 
I made a function just to play with it in the immediate window. Glad I could help.
 
You have a lot more expertise than me! Good work. I'm not great on Access. Excel ok, VB ok, just not Access!!
Ginny
 

Users who are viewing this thread

Back
Top Bottom