Wild Card Search, variable vs field

KTuohy

Registered User.
Local time
Today, 16:04
Joined
Aug 18, 2008
Messages
23
Good Afternoon, we're running 2007 and the smallest thing has me stumped!

Our table field ([Assembly Name]) has some that end in "-RF". But the dash that is pulled from the table in my_RF=Right ([Assenbly Name],3) is different than if I do chk_RF="-RF"! They never match. The table extraction is a smaller dash than my typing dash from the keyboard.:eek:

Is there some magic thing for all dashes to be equal? It's the darnest thing!

Basiclly, if [Assembly Name] ends in -RF, I want to cut it out completely but I can't use the fact that I'm looking for -RF.

Can anyone help me??? :(

Thank you.
 
I would pull a string from your table containing the offending dash, use the function Asc(YourDashHere) to get the Asc code for the dash, and then use the Chr(AscCodeOfTheDash)-function to regenerate your dash-character ad libitum.

Or even perhaps simply copy it from teh string and re-use. But it begs the question: are all your dashes like that? And will they remain so? I guess it depends on where the data comes from.
 
Last edited:
That worked like a charm! Didn't even think of ASC!

The data comes from multiple places, typed in, scanned in, copy/paste. SQL stores them all very nicely and generally speaking it comes out just fine in referencing etc. Just not this time. Go figure.

But it does work now and I can't thank you enough.
 

Users who are viewing this thread

Back
Top Bottom