Answered by:
SELECT Bryggning.*, Replace([Varunamn / batch],"E","A") AS BytNamn FROM Bryggning;

Question
-
Hi
This is a query I thought would replace "E" with "A", but nothing happens. What am I doing wrong?
SELECT Bryggning.*, Replace([Varunamn / batch],"E","A") AS BytNamn FROM Bryggning;
Best // Peter Forss Stockholm GMT +1.00
Tuesday, November 14, 2017 7:49 AM
Answers
-
This is a query I thought would replace "E" with "A", but nothing happens. What am I doing wrong?
SELECT Bryggning.*, Replace([Varunamn / batch],"E","A") AS BytNamn FROM Bryggning;
Replace it how? Since that's a SELECT query, it's not going to modify any data stored in the table, but I'd expect a datasheet opened to that query to have the calculated field BytNamn displaying a version of the [Varunamn / batch] field in which the letter "E" has been replaced with "A". Are you saying that doesn't happen? What do you see in [Varunamn / batch], and what do you see in the corresponding [BytNamn]?
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html- Marked as answer by ForssPeterNova Thursday, November 16, 2017 2:03 PM
Tuesday, November 14, 2017 5:42 PM
All replies
-
Hi Peter,
Is the database stored in a Trusted Location? If so, you might try using the Chr() function instead.
Hope it helps...
Tuesday, November 14, 2017 2:15 PM -
This is a query I thought would replace "E" with "A", but nothing happens. What am I doing wrong?
SELECT Bryggning.*, Replace([Varunamn / batch],"E","A") AS BytNamn FROM Bryggning;
Replace it how? Since that's a SELECT query, it's not going to modify any data stored in the table, but I'd expect a datasheet opened to that query to have the calculated field BytNamn displaying a version of the [Varunamn / batch] field in which the letter "E" has been replaced with "A". Are you saying that doesn't happen? What do you see in [Varunamn / batch], and what do you see in the corresponding [BytNamn]?
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html- Marked as answer by ForssPeterNova Thursday, November 16, 2017 2:03 PM
Tuesday, November 14, 2017 5:42 PM -
Hi DB
I run the database as Admin on my PC
Best // Peter Forss Stockholm GMT +1.00
Thursday, November 16, 2017 1:59 PM -
Hi Dirk
Thanks. I was blind and didnt see the column [BytNamn]. I was expecting it "to the left" by it mos in a right most position.
Best // Peter Forss Stockholm GMT +1.00
Thursday, November 16, 2017 2:06 PM