Using Modules

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.
 
J

John Spencer MVP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top