B
blobb
I am trying to build a recordset off of an entry on a form that "sounds like"
or is similiar to the current entry. I have the below code that was working
well last time I used it but I am now getting the "Data type mismatch error
in criteria expression". Could someone help me identify why this is? I have
tried double quotes, single quotes, no quotes...
The "Soundex" is the function for the sounds like, [Crosswalk] is existing
table.
Dim rst As dao.Recordset
Dim strLast As String
Dim db As Database
Set db = CurrentDb()
'If on a new row.
If (Me.NewRecord = True) Then
'...check for duplicate Lastnames.
If Not IsNothing(Me.LastName) Then
' Open a recordset to look for duplicate Lastnames.
Set rst = CurrentDb.OpenRecordset("SELECT PTid, Lastname,
FirstName, SSN FROM " & _
"Crosswalk WHERE Soundex([Lastname]) = '" &
Soundex(Me.LastName) & "'")
Thanks! blobb
or is similiar to the current entry. I have the below code that was working
well last time I used it but I am now getting the "Data type mismatch error
in criteria expression". Could someone help me identify why this is? I have
tried double quotes, single quotes, no quotes...
The "Soundex" is the function for the sounds like, [Crosswalk] is existing
table.
Dim rst As dao.Recordset
Dim strLast As String
Dim db As Database
Set db = CurrentDb()
'If on a new row.
If (Me.NewRecord = True) Then
'...check for duplicate Lastnames.
If Not IsNothing(Me.LastName) Then
' Open a recordset to look for duplicate Lastnames.
Set rst = CurrentDb.OpenRecordset("SELECT PTid, Lastname,
FirstName, SSN FROM " & _
"Crosswalk WHERE Soundex([Lastname]) = '" &
Soundex(Me.LastName) & "'")
Thanks! blobb