Query Criteria (1 Viewer)

D

dougbnv

Guest
I have a query that has a field called unit price it shows the values like 19.98

I want to find and replace the full stop so the unit price looks like 1998

I basically want the query to do a find and replace for me. Can this be done with criteria?
 

David R

I know a few things...
Local time
Today, 10:55
Joined
Oct 23, 2001
Messages
2,633
Not criteria, but a calculated field is what you want.

Use the Len, InStr, Left, and Right functions to modify the string. If the .xx is always at the end, you should be able to use something like this:
NoPeriodField: Left([StringField],Len([StringField])-3)+Right([StringField],2)

If the places after the decimal vary as well, you can use InStr to find its place and then substitute that value for the Len() statement above.
 
D

dougbnv

Guest
Thanks - that's perfect.
 

Users who are viewing this thread

Top Bottom