Help with the REPLACE Function

Santude

New member
Local time
Today, 02:58
Joined
Jun 26, 2012
Messages
6
I am working on a Access Web application and I am running into a problem with the REPLACE Function. I am trying to replace a " * " in the second position of a model number:
AHRItbl
FurnaceModelNumber
A*VC80905CXA*
G*VC950704CXA*
G*V950453B**
G*V950704C**
A*VC80703BXA*
G*VC80704BXA*


I am using the following expression in my query table:
FurnaceModel:Replace([FurnaceModelNumber],"*","M",2)
Access 2010 gives a message indicating that this function is not supported in Web-Compatible queries.
ny help would be GREATLY appreciated!!!
 
This is a workaround ... but it works!

Left(Trim([FurnaceModelNumber]),1) & Replace(Mid(Trim([FurnaceModelNumber]),2,1),"*","M") & Mid(Trim([FurnaceModelNumber]),3,20)

The TRIM function is included just in case you have any FurnaceModelNumber codes with leading blanks.

Hope it works for you ...
 

Users who are viewing this thread

Back
Top Bottom