Any thoughts on why this would not return the same results? (replace function)

bmal

Registered User.
Local time
Today, 11:27
Joined
Sep 23, 2013
Messages
30
Hello. Here is the exact field value from table (the field type is long text):
--------
11/26/2013 11:20AM - File withdrawn. - Mailed withdraw letter to applicant. - Blake Adams 11/21/2013 3:40PM - Will withdraw file - Sam Rogers
--------

here is what works perfectly:

Field1: Replace([data],"11/26/2013", "ABCD")

here is what does not work:

Field1: Replace([data],"[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]", "ABCD"

It's a good thing that I am patient; it's as if the Access Gods are taking revenge on me for something. :) jk.
 
>>>(the field type is long text)<<<

Do you mean "Long Integer" ?
 
replace replaces literal text with literal text and is not based on formatting or input masks so the literal string

"[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]"

if it exists in your string will be replaces with

"ABCD"

Here is a link to the details on the Replace function

http://msdn.microsoft.com/en-us/library/bt3szac5(v=vs.90).aspx

Probably a better way to understand what the Access Gods are trying to tell you.
 
I would not expect any replacements since the string "[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]" would not be found.

Replace() does not support the same syntax as SQL.
 
>>>(the field type is long text)<<<

Do you mean "Long Integer" ?


Hello. Here is a snippet of the table design. Noteworthy...this is a linked table to an SQL database.

attachment.php
 

Attachments

  • accessf15.png
    accessf15.png
    4.8 KB · Views: 132
CJ London and Galaxiom - those are very helpful comments. Thank you. Now I realize that I was on the wrong path with regard to the Replace() function.

I will read those references and see if I can put the knowledge into action and share what I ended up doing to accomplish the objective.

Many thanks once again.
 

Users who are viewing this thread

Back
Top Bottom