The below successfully find a 16 digit number, but only when found on it's own.
is there a way to change this code so that It can search through an entire DB or at least an entire text field and identify the 16 digit string?
Expand|Select|Wrap|Line Numbers
- Dim SQL As String, qdf As DAO.QueryDef
- Set qdf = CurrentDb.QueryDefs("cardsearch")
- qdf.SQL = "SELECT Id, case_overview " & _
- "From case_data " & _
- "WHERE LEN(case_overview) = 16 AND case_overview NOT Like '%[0-9]%'"
- Me.List194.RowSource = "cardsearch"
- DoCmd.Requery "list194"
Martin