Using Modules

  • Thread starter Thread starter DevilDog1978
  • Start date Start date
D

DevilDog1978

I am trying modules for the first time and I am lost. Module 1 reads:

Function StripString(strInput As String) As String
Dim objReg As Object

Set objReg = CreateObject("VBScript.RegExp")

With objReg
.IgnoreCase = True
.Multiline = False
.Global = True
.Pattern = "[^a-z|^0-9]"
StripString = .Replace(strInput, "")
End With

Set objReg = Nothing

End Function

How do I run a query and use this module? Any help on understanding modules
would be great.
 
In a query you would have a calculated field that looked like

Field: FixedFieldName: StripString([YourTableName].[YourFieldName])

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top