A family of Microsoft relational database management systems designed for ease of use.
Massive thanks, I’ll try it 🙏
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The 'Find and Replace' option used for text search doesn't work in ACCESS 2019 Pro +.
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Massive thanks, I’ll try it 🙏
You might find the following function useful:
Public Function MultiReplace(varInput, ParamArray varReplacements())
' call like this:
' MultiReplace("The cat sat on the mat", "cat", "mouse", "mat", "house")
' to return this:
' The mouse sat on the house
Const MESSAGETEXT = "Uneven number of replacements parameters."
Dim n As Integer
Dim varOutput As Variant
Dim intParamsCount As Integer
If Not IsNull(varInput) Then
intParamsCount = UBound(varReplacements) + 1
If intParamsCount Mod 2 = 0 Then
varOutput = varInput
For n = 0 To UBound(varReplacements) Step 2
varOutput = Replace(varOutput, varReplacements(n), varReplacements(n + 1))
Next n
Else
MsgBox MESSAGETEXT, vbExclamation, "Invalid Operation"
End If
End If
MultiReplace = varOutput
End Function
You'd call it in an UPDATE query to make multiple replacements in each row simultaneously.
You might find the following function useful:
Public Function MultiReplace(varInput, ParamArray varReplacements())
' call like this:
' MultiReplace("The cat sat on the mat","cat", "mouse", "mat", "house")
' to return this:
' The mouse sat on the house
Const MESSAGETEXT = "Uneven number of replacements parameters."
Dim n As Integer
Dim varOutput As Variant
Dim intParamsCount As Integer
If Not IsNull(varInput) Then
intParamsCount = UBound(varReplacements) + 1
If intParamsCount Mod 2 = 0 Then
varOutput = varInput
For n = 0 To UBound(varReplacements) Step 2
varOutput = Replace(varOutput, varReplacements(n), varReplacements(n + 1))
Next n
Else
MsgBox MESSAGETEXT, vbExclamation, "Invalid Operation"
End If
End If
MultiReplace = varOutput
End Function
You'd call it in an UPDATE query to make multiple replacements in each row simultaneously.
Where are you trying to perform a find & replace? (Form, Table, Query, VBA/VBE, ... ???)
Did it work previously? If so, what has changed?
Can you provided detailed reproduction steps for us to try and replicate the issue. Perhaps a screen recording showing the issue.
Have you tried updating/rolling back your build?
Have you tried performing an Office/Access repair?