Trimming Characters

Stylez

New member
Local time
Today, 07:12
Joined
Feb 14, 2007
Messages
5
Good Morning to all

i would like to kindly ask if there is a pre defined function in the VBA SQL of access in which it will trim a certain field programmatically

for example

Old string = Manila-MSE Building - 30.26f
New String = Manila-MSE Building

Thanks for your help
 
Stylez,

VBA has many functions like InStrRev which could be useful here, but I suspect you're
going to need a few lines of code to define the rules. Does each string end like
"- nn.nnf"? Are you only truncating on the right?

need more info,
Wayne
 
Yes i am truncating on the right. may i ask if you have a sample code or sql query in which you use the instrrev function?

Thanks
 
These Values are the actual fields in the database in which i need to truncate.

Old string = Manila-MSE Building - 30.26f
New String = Manila-MSE Building

your assistance is gladly appreciated
 
we need more info on your data to advise you.
What are the rules for truncating? will every record need to be truncated from the last "-" to the end? or can there be variations?

Peter
 

Users who are viewing this thread

Back
Top Bottom