Calculated field with replacement (1 Viewer)

MikeyIGN

New member
Local time
Today, 21:12
Joined
Feb 4, 2019
Messages
2
Hello, I am creating a table for the use of auto searching a specific website online.


I need to replace the " " in a product name with "+" so that it's a friendly URL.


I have tried the replace function but Access tells me this isn't allowed?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:12
Joined
May 21, 2018
Messages
8,463
I have tried the replace function but Access tells me this isn't allowed?
Paste your real code, that should work no problem.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:12
Joined
Oct 29, 2018
Messages
21,358
Right. The Calculated column only has a limited set of functions you can use. You may have to replace the spaces with + in the actual field using a query rather than in the calculated one. Just a thought...
 

MikeyIGN

New member
Local time
Today, 21:12
Joined
Feb 4, 2019
Messages
2
Thanks for your input so far.


I have tried the following statement on a double click event in the form to test (using the Expression Builder):


=Replace([Product]," ","+")
Product is simply the product title. And the field that I wish to double click is called Product_Parsed.



When I doubleclick I get nothing though.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:12
Joined
May 21, 2018
Messages
8,463
Sorry missed the calcualted fields. Do this in a query instead. No need for a calculated field.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:12
Joined
May 21, 2018
Messages
8,463
That does not look like something that would go in an event procedure, it looks ok for a calculated control. Post your real code.
 

Users who are viewing this thread

Top Bottom