Trouble Finding a #sign with Find/Replace

  • Thread starter Thread starter eatc7402 via AccessMonster.com
  • Start date Start date
E

eatc7402 via AccessMonster.com

I am having trouble doing a FIND on a text string that contains a # sign.
As in the string like "Run #12345". Some were mistyped as
"Run#12345", and I am trying to do a Find/Replace to change "Run#"
into "Run #".

But the Find/Replace option does not seem to like the # sign in a search.
Maybe I need to surround the # sign with some kind of delimiter but can't
seem to find documentation about this.

Thanks.
eatc7402
 
That's probaly because the # character is used to define a date entry...
ex. #1/1/07#
Primarily though, your table design has led to this problem. By actaully combining
multiple "values" in one field... Run (what is is) and # (it's a number) and 12345 (the
actual number) your going to have further problems besides this one. (Ex. Sorting, or
Grouping, etc..)
Your field should have been named RunNo with example values such as 12345, 61725,
17235, etc....

You could however, create a query, where the criteria against that field that would
find all the Run#XXXXX entries.
InStr([YourFieldName],"#") = "4"
will find all Run nos where # is the 4th character. You can edit that recordset to
correct those entries.

I would suggest that you rework your table design though, the you could use the Find
method to locate 12345.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
I am having trouble doing a FIND on a text string that contains a # sign.
As in the string like "Run #12345". Some were mistyped as
"Run#12345", and I am trying to do a Find/Replace to change "Run#"
into "Run #".

But the Find/Replace option does not seem to like the # sign in a search.
Maybe I need to surround the # sign with some kind of delimiter but can't
seem to find documentation about this.

Thanks.
eatc7402

In the find dialog box, put the # symbol within brackets.

Run[#]

But then if you wish to replace Run# with Run # why not just create an
update query and let Access do all the work?

Update YourTable Set YourTable.FieldName =
Replace([FieldName],"Run#","Run #");
 
Thanks, problem solved. The "[" "]" delimeters was the key. Indeed used then
an update query
to fix up the data. Thanks
I am having trouble doing a FIND on a text string that contains a # sign.
As in the string like "Run #12345". Some were mistyped as
[quoted text clipped - 7 lines]
Thanks.
eatc7402

In the find dialog box, put the # symbol within brackets.

Run[#]

But then if you wish to replace Run# with Run # why not just create an
update query and let Access do all the work?

Update YourTable Set YourTable.FieldName =
Replace([FieldName],"Run#","Run #");
 
Fred,
&##&$%! ... missed another chance to use the Replace Function!
Guess I'm just stuck in my old ways. :-D

Also, that Run[#] is totally new to me... probably because I never use the # in any
names, and I always "grow my own" Find.
Good suggestion...
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


fredg said:
I am having trouble doing a FIND on a text string that contains a # sign.
As in the string like "Run #12345". Some were mistyped as
"Run#12345", and I am trying to do a Find/Replace to change "Run#"
into "Run #".

But the Find/Replace option does not seem to like the # sign in a search.
Maybe I need to surround the # sign with some kind of delimiter but can't
seem to find documentation about this.

Thanks.
eatc7402

In the find dialog box, put the # symbol within brackets.

Run[#]

But then if you wish to replace Run# with Run # why not just create an
update query and let Access do all the work?

Update YourTable Set YourTable.FieldName =
Replace([FieldName],"Run#","Run #");
 
Fred,
&##&$%! ... missed another chance to use the Replace Function!
Guess I'm just stuck in my old ways. :-D

Also, that Run[#] is totally new to me... probably because I never use the # in any
names, and I always "grow my own" Find.
Good suggestion...

There are several symbols that need the brackets when searching for
them. The ? * and # come to mind without thinking too hard. There may
be some others as well. When searching for a symbol, if you can't find
it and you know it's there, put a bracket around it and try again. <g>
 
Back
Top